QB64Team / qb64

BASIC for the modern era.

Home Page:https://www.qb64.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We need some kind of _NEWSND function to make sound buffers

a740g opened this issue · comments

I noticed that we have a _NEWIMAGE that lets us do the same for images, but nothing for sound. I am aware of _SNDRAW & _SNDOPENRAW, but that does not serve my purpose. What I really want is a sound buffer that can be created programmatically and filled with custom sample data to be reused later multiple times. Something like:

soundHandle& = _NEWSND(sampleRate&, sampleBits&, sampleChannels&)

We can then get access to the buffer by using _MEMSOUND[(soundHandle&, channel%)].

If there is a way to do this currently in QB64 (without using external libs or hacks) then please let me know.