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

From: Dan Muresan <danmbox@email-addr-hidden>
Date: Mon Jul 04 2011 - 14:58:20 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.

There is one remaining issue that I have discovered while writing
jack-file, and which can only be addressed via a VIO layer of some
sort. While reading a FLAC file, the sndfile request size stream looks
like

8188, 8188, 8188, 8192 etc (bytes)

This is with the user continuously requesting 16384 frames. You will
notice that these are uneven block sizes. If I understand correctly
e.g. the stat(2) page, these are inefficient syscalls:

"The st_blksize field [of a struct stat] gives the "preferred"
blocksize for efficient file system I/O. (Writing to a file in smaller
chunks may cause an inefficient read-modify-rewrite.)"

Without a VIO layer (or a libsndfile user-space cache), this is not
solvable by the user at higher abstraction layers.

-- Dan
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Jul 4 16:15:02 2011

This archive was generated by hypermail 2.1.8 : Mon Jul 04 2011 - 16:15:02 EEST