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/ _______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-devReceived on Tue Jun 14 16:15:02 2011
This archive was generated by hypermail 2.1.8 : Tue Jun 14 2011 - 16:15:02 EEST