[Openal] Typical settings for streaming sources
Garin Hiebert
garinh at cheesetoast.net
Wed Oct 11 10:25:38 PDT 2006
>> First and foremost, are there any "well, duh" factors that I might be
>> missing? :) I think I've checked everything, but I may not habe.
It seems like you're checking for the right thing, and that you have an
occasional under-run condition. OpenAL is supposed to stop a source
when the queued data runs out, so your solution of detecting the stop
and then re-starting is the right solution. The underlying cause is
going to be a little more complicated to figure out, as you've already
experienced... ;-)
You might want to revisit the buffer sizes and make sure they're
appropriate for what you're playing. If the Ogg Vorbis data is being
decoded to a 44.1kHz stereo PCM stream, for instance, then each of your
buffers (4 * 4096 bytes) contains less than 10ms of data, which may be
too small for the service interval (given that one service interval may
occur just before a buffer is fully used, and then one or more buffers
may be spanned before the next service interval occurs).
BTW -- having multiple buffers be processed "at once" is plausible --
the timer interval inside the "Generic Hardware" and "Generic Software"
devices is larger than 10ms (I think it's 25ms for both, but I don't
have the source code in front of me).
Garin
More information about the Openal
mailing list