[Live-devel] ucEOF check

Ross Finlayson finlayson at live.com
Fri Apr 16 13:38:47 PDT 2004

>I'm playing around with your wav-file loader and adapting it for some 
>multichannel files.  the WAV_FORMAT_EXTENSIBLE flag (as opposed to 
>WAVE_FORMAT_PCM) is represented by 0xfffe.  EOF (at least as defined in 
>stdio.h on my mac) is -1.  Since you convert EOF to an unsigned char, and 
>compare byte by byte, either of the get*Bytes or skipBytes seems to fail 
>when it comes across any 0xff in the header.  I've hacked it out, but 
>thought I'd speak up in the event anyone plans to work with 
>WAVE_FORMAT_EXTENSIBLE files.  Maybe there's a better way to check?


Until your note, I wasn't aware of WAV_FORMAT_EXTENSIBLE files (but I found 
a good description online at 

If you end up updating "WAVAudioFileSource.cpp" to support such files, then 
please send us the patch, and I'll see if I can incorporate this into a 
future release.

	Ross Finlayson

More information about the live-devel mailing list