sw17ch/portaudio — pull request #2 by a-wild-tigger (2012-02-22 08:58:47+00:00)
Title: Some more updates

Again, thanks for writing these great bindings!

I've made a number of changes and included a working example of playing a sine wave. I had to change a number of things in the original code, specifically, addition of final callbacks and typed streams.

For the most part callback io through ffi, is pretty poor, as the example shows, I'm not sure why (possibly garbage collection, but I'm not sure what would need to be freed, any way that's something to investigate). However blocking io is much clearer. Typed streams are necessary since the streamread and streamwrite need to know how to cast back data into the appropriate type.

I've also addded a base Buffer typeclass, so that people can eventually use vector/storablevector instead of raw pointer operations.

Please let me know your thoughts, and if there might be a way to update the existing package to Hackage (which seems extremely outdated). If it's not quite ready to update in your view, please let me know what else I can do.