[Openal] Cant find a simple OpenAl example code

Chris Robinson chris.kcat at gmail.com
Sun Mar 8 23:34:57 PDT 2009


On Sunday 08 March 2009 11:46:25 am Margin Marh wrote:
> I been trying to make a simple "load a test.wav" in Openal this whole week
> but i could not do it so i started searching on the internet and i got a
> few OpenAl tutorials but they are all outdated...

The thing is that wav loading needs to read the file and parse the wave header 
information, with possibly some data conversion. And because of that, it's 
better to include it in a framework of sorts so the different applications can 
make use of it, without having to duplicate the code all over the place.

Ideally, if you don't need to write a .wav file parser yourself, you'd use 
something like ALURE <http://kcat.strangesoft.net/alure.html> which can load 
sound files into buffers for you. The advantage of ALURE is that it'll load 
many types of audio files (not just wave) and is aware of common extensions so 
you don't have to specifically code for them.

ALURE also includes a examples showing how to load and stream sound files.


More information about the Openal mailing list