[Openal] alSourceQueueBuffers Report Error
steve
steve at astrocorp.com.tw
Fri Oct 27 02:39:07 PDT 2006
Thank you, Garin.
So, to apply your scheme on my application, Is there any way that OpenAL can
tell me that the one buffer is played finished even there are some buffers
in the queue?
If the answer is no, than I may use the following scheme.
------------------------------------------------------------------
Save all the desired voice buffers in my own queue list.
While the source is not playing
{
if break-in voices are needed,
{
empty the queue list.
play break-in voice, may need to add some buffers in my
queue list.
}
else
{
pop a front buffer from my queue list
set the buffer to the source and play.
}
}
Steve
-----Original Message-----
From: astrocorp at host.ms109.net [mailto:astrocorp at host.ms109.net] On Behalf
Of Garin Hiebert
Sent: Friday, October 27, 2006 5:11 PM
To: steve
Cc: openal at opensource.creative.com
Subject: Re: [Openal] alSourceQueueBuffers Report Error
> Did you mean that there is no way to remove the queued buffers that
> are not played yet?
>
Correct. Don't add a buffer to the queue unless you intend to play it.
If playback needs to be aborted, just do an alSourceStop, then all the
buffers will be marked as processed and they can all be removed. This isn't
normally much of an issue for streamed data, because if you want to remove
an un-played buffer from a stream of continuous data, you're going to get an
audible glitch anyways, so the stop, re-queue, play isn't (audibly) any
worse...
Garin
More information about the Openal
mailing list