[Openal] Audiosink
Garin Hiebert
garinh at cheesetoast.net
Thu Sep 28 14:26:38 PDT 2006
> I am a little confused
> with buffers, sources and channels!
> What is the relation between them?
> If I have five channels, should I use five sources?
>
I'm not sure what you mean by channels. I assume you're referring to
"streams of audio data," but if not then correct me...
A buffer stores audio data. If you are streaming, you'll put the audio
data into buffers, and queue them together to make a continuous stream
(or multiple continuous streams).
A source is an object which contains one or more buffers, and can have
3D properties such as position, velocity, etc. All sources also have
other properties such as gain.
An illustration -- For minimal playback in OpenAL, the following will
produce audio:
1) create a buffer
2) put audio data in the buffer
3) create a source
4) attach the buffer to the source
5) call alSourcePlay on the source
Garin
More information about the Openal
mailing list