[Openal] queing buffers vs attaching static buffers
Chris C.
wmiAL at windwardmark.net
Thu Jun 30 07:29:30 PDT 2005
I recall that back in the OpenAL 1.0 spec you were supposed to determine
whether a source would be for a static buffer or for streaming something
from queued buffers. From what I read, once you queued buffers on a
source you couldn't later attach a static buffer and if you attached a
static buffer, you couldn't later queue buffers on that source. Will
this still be the case in OpenAL 1.1.
I see that there is now an AL_SOURCE_TYPE property which claims that you
can attach the NULL buffer to set the source back to an undetermined
state and then switch the state. Does this actually work? Has anyone
tested using one source to switch back and forth between streaming
buffers and using a static buffer?
If this does work, am I correct in thinking that when switching from
static to streaming and from streaming to static, I should first call
alSourcei(AL_BUFFER, NULL)? When switching from streaming to static, do
I need to unqueue all buffers? Do I need to do anything else to clean
it up, or will attaching the NULL buffer and then attaching the buffer I
want properly clean everything? If I later switch back to it being a
streaming source, do I need to worry about any initialization?
Thanks
--Chris
More information about the Openal
mailing list