Re: audiofile -- endian issues

Michael Pruett <[email protected]> Thu, 11 Sep 2003 20:57:55 -0500
Newsgroups gmane.comp.audio.audiofile
Message-ID <[email protected]>
On Thu, Sep 11, 2003 at 08:48:58PM -0500, Davy Durham wrote:
> On a big-endian machine would I still need to swap endian when saving to
> a .wav file.  I'm fairly sure that for the .wav format it is always assumed that the PCM is little
> endian.  The lib won't accept anything but little endian for afInitByteOrder().  
> And it doesn't seem to be doing any byte swapping on it's own
> when writing a .wav on a big endian machine.
> 
> Is this the case for all the formats?

Davy, the byte order of the WAVE file format is always little-endian,
but the virtual byte order of any file is, by default, always the native
byte order of the system (big endian in your case).

Michael