Re: RF64 file format and commercial software

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fons@xxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user


[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux