Re: [LAU] RF64 file format and commercial software

From: Erik de Castro Lopo <mle+la@email-addr-hidden-nerd.com>
Date: Fri Oct 15 2010 - 01:47:33 EEST

fons@email-addr-hidden wrote:

> I'm well aware of this.

Good.

> For the headers the byte-swapping overhead is
> really without consequence,

Thats why I didn't mention it :-).

> Another feature I like is that provided the headers are flushed to
> disk and the data length set to -1 you get a valid file even if
> it is was not closed cleanly, e.g. as a result of a power failure
> or software crash. Does libsndfile do the right things to support
> this ?

By default, it doesn't do the right thing if the file is not properly
closed, but it is possible to force update of the header using:

    http://www.mega-nerd.com/libsndfile/command.html#SFC_UPDATE_HEADER_NOW
    http://www.mega-nerd.com/libsndfile/command.html#SFC_SET_UPDATE_HEADER_AUTO

The second of these updates the header at the end of each write. As
long as you are doing large writes, the overhead should be negligible.

I'll also look into doing what you suggest, writing the maximum
value for the data field length when the file is initially opened.

Cheers,
Erik

-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Fri Oct 15 04:15:02 2010

This archive was generated by hypermail 2.1.8 : Fri Oct 15 2010 - 04:15:02 EEST