[Live-devel] streaming WAV files...

Ross Finlayson finlayson at live.com
Thu Apr 8 07:37:15 PDT 2004

At 03:25 AM 4/8/04, you wrote:

>Before I post anything, a quick glance through the code doesn't seem to 
>account for endian-ness.

Yes it does.  If you look at the functions "get4Bytes()" and "get2Bytes()" 
in the file "liveMedia/WAVAudioFileSource.cpp" (which is where WAV audio 
files are read and parsed), you'll see that 4 and 2-byte structures within 
WAV files are read as little-endian, regardless of the endianness of the 
host computer.

>  I'm serving from a mac (OSX), so my guess is I'm reading the file as 
> little endian.

As it should - because WAV audio files are assumed to be always little endian.

If this is incorrect - i.e., if WAV files can be either little *or* 
big-endian, and there's some flag somewhere in the file's header that 
indicates this, then let me know.

	Ross Finlayson

More information about the live-devel mailing list