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

From: Dan Muresan <danmbox@email-addr-hidden>
Date: Tue Jun 21 2011 - 10:50:36 EEST

> 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
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Jun 21 12:15:03 2011

This archive was generated by hypermail 2.1.8 : Tue Jun 21 2011 - 12:15:03 EEST