Dan Muresan wrote:
b) Work
around it.
This is what I was trying to do via pthread_cancel + sf_open_fd. It
seems to work with FLAC.
However, there could be memory leaks if any decoder / encoder function
(in sndfile or one of the external libs) allocates temporary memory
that it expects to free before returning. Do you know if this might be
the case (e.g. for the native formats, libFLAC, libvorbis)?
No idea. I would be surpised if this works.
I may need to fall back on the vio stuff. How does a
sf_vio_read or
sf_vio_write signal I/O errors?
I never foresaw the possiblity of anybody doing this. I suspect they
should return -1.
How does a vio_read signal EOF?
Just like the read() system call, by returning zero.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/