You can do this with OpenAL and ALUT . I managed to install both on Windows 8, although it was not quite easy; ALUT requires the C base library to be manually compiled into a DLL.
Installing OpenAL - on the other hand - is as simple as downloading the SDK and entering cabal install OpenAL at the command line.
Using ALUT, you can create OpenAL buffers from audio files (including WAV) and types of memory.
I found an example of recording and playing sound here . It should be pretty simple to adapt the code to your needs.
Let me know if I left something, and I will try to clarify.
Swiftsnamesake
source share