[Openal] What goes after main()?
Valery_Carpentier at cle.creative.com
Mon Jan 23 02:44:22 PST 2006
openal-admin at opensource.creative.com wrote on 19/01/2006 16:29:01:
> To play wav files, look at PlayStatic in the Samples
> A function called
> ALboolean LoadWave(char *szWaveFile, ALuint BufferID)
> reads in the wav file. These are simple because they
> are not compressed. They are the BMP format of the
> sound world.
LoadWave in PlayStatic simply uses alutLoadWAVFile and alutUnloadWAV.
And also, it's not quite true that WAV file are not compressed. WAV files
can perfectly contain compressed data (ADPCM)
> For other formats, you need to get a 3rd party lib or
> write your own. Decompress them to raw data (PCM), and
> feed them to a AL buffer.
Or even better, decompress them on the fly and use alSourceQueueBuffers.
More information about the Openal