[Haskell-cafe] FFI woes!

Keean Schupke k.schupke at imperial.ac.uk
Thu Dec 16 04:46:34 EST 2004

What about using a StablePtr? If you're dealing with hardware you would 
get the
end-of-sample interrupt to free the buffer... Either way you either have 
to delay GC
until the sample playback has finished... (well technically until the 
soundcard DMA
has transferred the sample to the soundcards onboard memory) or free the 
when playback has finished. These ammount to the same thing... but using 
a StablePtr
and explicit free seems much nicer than hacking strange stuff into a 


More information about the Haskell-Cafe mailing list