« Return to Thread: Problem with alSourceUnqueueBuffers

Re: Problem with alSourceUnqueueBuffers

by Garin Hiebert :: Rate this Message:

Reply to Author | View in Thread

> You should also include code that
> checks that the Source is still playing, and if not, include logic  
> to start
> it playing again.

This is why there are no errors returned, by the way.  As far as  
OpenAL is concerned, everything is fine.  It runs out of data and then  
stops the source just like it should.  No error.   ;-)

In summary, make two changes:

1)  The implementation should be changed such that it has 100ms or so  
of data available in multiple buffers (four or so seems "reasonable,"  
but as few as two _should_ work).

2)  Detect an "under-run" by looking for streams which have stopped  
sources.  When detected, buffer up a full set of buffers for that  
source and do a Play on that source.  In most products, this should be  
a very rare occurrence, but may still happen during long disk access  
or some other operation which stalls the engine for a while.

Garin


_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

 « Return to Thread: Problem with alSourceUnqueueBuffers