[LAU] RF64 file format and commercial software

Erik de Castro Lopo mle+la at mega-nerd.com
Thu Oct 14 22:47:33 UTC 2010

fons at kokkinizita.net wrote:

> I'm well aware of this.


> 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:


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.

Erik de Castro Lopo

More information about the Linux-audio-user mailing list