Re: Looping and buffer queuing
Daniel PEACOCK <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <OFBD4E17F5.7D3B4FD1-ON8025773C.002E9B94-8025773C.002F0102@cli.creaf.com> |
Hi Carsten, > 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. Yes that's true, if your streaming source can be intentionally stopped by your application then you will need to make sure it doesn't get re-started in the streaming update code. Perhaps maintaining a list of active streaming Sources would help. You would add a Source to the list when a stream starts playing, update each source in the list in the update streams code, and remove a Source from the list when it is stopped intentionally or reaches the natural end. Dan Creative Labs, UK _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal