[Live-devel] streaming WAV files...

Matthew Romaine Matthew.Romaine at jp.sony.com
Fri Apr 9 19:27:18 PDT 2004


Hi Ross,

Okay, here's the file I'm trying to stream which plays fine with a 
regular audio player but comes across the network as noise:

http://www.audiolicious.com/misc/test.wav

Also, I mixed up big / little endian -- Macs are big endian of course.  
at first I thought the fread in WAVAudioFileSource might be a culprit, 
but seems it reads in byte by byte so that should be okay....right?

only picked up your code earlier this week so am still trying to figure 
out the pipeline, but it'd be nice to be able to send even just a wav 
file....mp3 works fine though...

just a note, i'm adapting the testOnDemand -- I snipped everything out 
except the one that streams wav files; I know this only sends as 
unicast, and that is what I prefer to do for right now.

thnx,
matt

On 2004/04/08, at 22:37, Ross Finlayson wrote:

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




More information about the live-devel mailing list