[LAD] [LAU] cancelling I/O with libsndfile
Dan Muresan
danmbox at gmail.com
Tue Jun 21 07:50:36 UTC 2011
> I never much liked the VIO layer. It was only ever added because
> a large number of people requested it. I think its fragile and
> it exposes too much of libsndfile internals to the user.
Well, it doesn't seem to expose anything other than the set of chosen
functions (read / write / seek etc) -- no data structure, no special
#include's...
My problem is that the VIO API isn't (yet) clearly specified /
documented (e.g. what the virtual read / write should return for
errors, for EOF, whether it's acceptable to return short counts). You
may also be missing an errno-like VIO function, but I can't comment
much as I don't quite understand the existing sf_error() stuff.
By "fragile" you probably mean that the set of VIO functions, or their
API, might change in the future? Do you foresee the need to add or
remove stuff? It seems like a pretty standard set of functions,
similar to what you'd specify for a VFS layer.
> I would be surprised if reset-by-seek didn't work on standard
> WAV/AIFF etc files with PCM data accessed via the standard
> sf_read/write* functions.
Probably, but since I'm using sndfile, I don't want to special-case
formats in my app... At the very least, does a successful sf_seek()
guarantee that all errors have been cleared and that future I/O will
occur undisturbed (in the places where the file contains no errors,
obviously)?
-- Dan
More information about the Linux-audio-dev
mailing list