[fpc-pascal] playing sound files (linux and windows)
dmitry boyarintsev
skalogryz.lists at gmail.com
Tue Jun 15 15:54:35 CEST 2010
On Tue, Jun 15, 2010 at 3:29 PM, Graeme Geldenhuys
<graemeg.lists at gmail.com> wrote:
> I can't find an example for loading a .wav file. I managed to extract the
> initialization and finalization code for OpenAL from the FCL examples, but
> now the main part is the call alSourcePlay(buffer) , but I don't know how
> to populate the buffer with a WAV file.
You can download the sample from here: http://havefunsoft.com/fpc/wavetest.zip
The test has been modified to support .wav files.
Be warned, waveutils.pas is able to read uncompressed wav PCM files
only. If .wav file uses anykind of the compression it would impossible
to read it. Most of sound-processing applications allow to convert
.wav to uncompressed form.
thanks,
dmitry
More information about the fpc-pascal
mailing list