Audio: the basics

BlitzMax Forums/BlitzMax Beginners Area/Audio: the basics

taxlerendiosk(Posted 2005) [#1]
Could someone who understands how digital audio (from a programming point of view) works try to explain it to me? From what I understand, when a static sound sample is played there's a buffer in memory that's filled with data, which is read off until the end of the buffer is reached. Presumably, in streaming audio, only a bit of the full audio data is put into the buffer, and the data is replaced with new data after it's been played, and the buffer reading pointer loops round to the beginning of the buffer rather than stopping when it reaches the end.

The reason I ask is that I want to be able to get at Blitz's own audio buffer and try streaming something direct to the sample buffer myself (or a sample buffer, there must be one for each channel?), but I just can't get my head round the freeaudio code.