Re: Looping and buffer queuing

"Carsten Fuchs" <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
Hi Daniel,

thank you very much for your reply!

On 07.06.2010 14:53, Daniel PEACOCK wrote:
> Assuming you are using a buffer queue to stream a (long) piece of audio you
> should know if you have finished transferring all the audio from the stream
> to the Buffer Queue.

Yes, sure...

>  So perhaps something like this will work.

Yes, thanks, this is similar to the code that I already use.

I've thought more about this; what got me confused and caused my original question was what 
happens in code like in your example when alSourceStop() is called while the stream is playing:

After a call to alSourceStop(), the update code might still find that buffers have been 
processed, and thus set bAddedNewAudio = AL_TRUE, -- and erroneously restart the audio!

So calling alSourceStop() alone is not enough - additional code is required that e.g. clears the 
buffer queue as well so that accidental restarts in the update code are avoided.

Many thanks for your help!  :-)

Best regards,
Carsten



-- 
     Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
            Learn more at http://www.cafu.de

_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.