[Openal] double buffering audio playback
Filip Iliescu
djpriya at gmail.com
Wed Apr 11 20:21:45 PDT 2007
Hello,
Some Background:
I have multiple buffers with many sounds all loaded as wave files
using the alutLoadWave method. I was going to share buffers among the
sources so that multiple objects in my game can have the same sound
and therefore only have one sound per buffer.
Im familiar with the idea of double buffering in OpenGL: drawing to an
offscreen buffer and swapping buffers on each render. After reading
the ogg vorbis / OpenAL tutorial below, I realize it might be
important for audio as well.
Given that Im using wav files and they are already preloaded into a
single buffer per wav file, Im not sure if I need to do this per
source. It would make sense to me that all the sources are mixed into
a final listener buffer for output to device and maybe double
buffering the listener would be good but Im assuming OpenAL takes care
of that somewhere. Do I need to load a single wav file into two
buffers and queue each up for playback per source? Seems like
overkill.
reference (Ogg Vorbis/OpenAL tutorial):
http://www.devmaster.net/articles/openal-tutorials/lesson8.php
Thanks
More information about the Openal
mailing list