[Haskell-cafe] reading and playing music openAL
Patai Gergely
patai_gergely at fastmail.fm
Wed Jul 7 05:09:31 EDT 2010
Hello,
> 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 [1]), 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 [2].
Gergely
[1] http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27083
[2] http://lists.lurk.org/mailman/listinfo/haskell-art
--
http://www.fastmail.fm - Does exactly what it says on the tin
More information about the Haskell-Cafe
mailing list