[Openal] Playing a source with no buffer
Tim Sorrells
tsorrells at breakawayltd.com
Thu Mar 13 07:36:30 PDT 2008
I ran into something unexpected while streaming in a wave. What happens
is when the source is created it queues a request in another thread to
stream in the wave data from the harddrive. However the user is free to
call Play on the source at any time, even before any data has been
streamed yet. So the problem is when it calls alSourcePlay on a source
with no associated buffer. What I'm expecting is that it will change to
the AL_PLAYING state immediately, but then the next time OpenAL updates
it will realize it has no data and cycle to AL_STOPPED, the same
behavior as if it had run out of data in an associated buffer. Instead
it stays in AL_PLAYING indefinitely while, of course, not actually
playing any sound.
So I don't think this should be desired behavior. It seems to me either
the state should cycle to AL_STOPPED (or even AL_INITIAL since there's
no sound data for the source yet) or this should be an invalid operation
and an error should be issued.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20080313/88d74e83/attachment.html
More information about the Openal
mailing list