[Haskell-cafe] reading and playing music openAL
patai_gergely at fastmail.fm
Wed Jul 7 05:09:31 EDT 2010
> Hi ! We have a question about about openAL. We would like to know if anybody
> knows how to read a WAV file by chunks of a determined size, and after doing
> some processing with a specific chunk send that same chunk back to the sound
> card so we can play the whole WAV continiously (just like a music player).
The basic idea is that you have to define a source and repeatedly call
queueBuffers on it. I wrote an OpenAL version of the Hemkay module
player (example code without comments, with some horrible way to achieve
double buffering can be found at ), which can be compiled if you have
installed the hemkay-core package. Also, you might want to ask sound
related questions on the Haskell art list .
http://www.fastmail.fm - Does exactly what it says on the tin
More information about the Haskell-Cafe