[LAD] [LAU] cancelling I/O with libsndfile

Erik de Castro Lopo mle+la at mega-nerd.com
Mon Jun 20 22:52:46 UTC 2011

Dan Muresan wrote:

> Hi,
> does libsndfile ever clear the error flag on a file? E.g. if there is
> a decoding error in a FLAC, and I sf_seek() back to the beginning,
> will sf_read_() work "normally" again?

Maybe not on FLAC. I would suggest  that you write a small
standalone test program to  test this and if you don't
get what you think you should, send me the test program
and an explanation of what  you  think you should get.

> Or, if a premature EOF is reached, will seeking back somewhere in the
> file allow playback to resume? libsndfile claims to support
> simultaneous reading and writing...

This is not possible on all file types, especially  not
on compressed formats like FLAC. It  does however work
on PCM data for most  file formats.

Erik de Castro Lopo

More information about the Linux-audio-dev mailing list