I did some refactoring, and separated the device independent part of
Hemkay into a package of its own, hemkay-core . This is a library
that provides facilities to load MOD music and render it in various
ways, including a direct-to-buffer option that's considerably more
efficient than creating a list of samples. You can use it to create a
MOD player with any sound-making API or even write the mixer output into
a wav file.
The hemkay package  is now reduced to an example that shows how to
use the core library with PortAudio. It is also considerably faster than
the previous version, because now I push as many samples as possible at
a time without blocking. I had no luck with Mietek's callback interface
so far, because it keeps randomly segfaulting on me, but when it works,
it's about four times as fast as the current player. You are encouraged
to try adapting it (using mixToBuffer) to other systems.
http://www.fastmail.fm - Choose from over 50 domains or use your own
Haskell-Cafe mailing list