Re: [LAU] RF64 file format and commercial software

From: Erik de Castro Lopo <mle+la@email-addr-hidden-nerd.com>
Date: Thu Oct 14 2010 - 07:56:36 EEST

fons@email-addr-hidden wrote:

> I'm not really in love with RF64. For my own multichannel use I've
> standardized on CAF - clean format, no 4GB problems, and all apps
> using your library can read it.

Thats an interesting choice.

The main thing with CAF is that it is by default a format optimised
for big endian systems (it was developed on PowerPC). All the chunk
length fields are stored big endian and by default things like 16
bit PCM data is stored big endian.

The libsndfile CAF implementation leaves the CAF defaults as they are
but allows you to specify that the audio data be stored little endian
or with the same endian-ness as the CPU. This is done by specifying
the format to be either:

    SF_FORMAT_CAF | SF_FORMAT_PCM_16 | SF_ENDIAN_LITTLE

or

    SF_FORMAT_CAF | SF_FORMAT_PCM_16 | SF_ENDIAN_CPU

If you are on a little endian CPU and using sf_read_short() to read
data, reading file data of the same endian-ness as the CPU will be
significatly faster than reading data that needs to be byte swapped.
Similarly for SF_FORMAT_FLOAT being read using sf_read_float().

Just letting you know.

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 Thu Oct 14 08:15:02 2010

This archive was generated by hypermail 2.1.8 : Thu Oct 14 2010 - 08:15:02 EEST