[Openal] Streaming PCM data to buffers
Peter Mulholland
darkmatter at blueyonder.co.uk
Thu Aug 16 08:35:54 PDT 2007
Hello Katharina,
The best way is to allocate several short buffers, fill them with data
and then use AL's buffer queuing system. When a buffer has been
played, you can then fill it with more data, and re-queue it.
A good example using Ogg Vorbis directly is here:
http://www.devmaster.net/articles/openal-tutorials/lesson8.php
This uses vorbisfile to provide the data, but the principle is the
same if you're using DShow to generate the stream.
The only gotcha, is this requires regular polling to check if a buffer
has been played, and if more data is needed. Typically, an idle thread
is used for this, where regular polling cannot be guaranteed.
--
Best regards,
Peter mailto:darkmatter at blueyonder.co.uk
More information about the Openal
mailing list