(Also known as WAV files containing MP3 data :-)

Attached is an example of one of these WAV headers. It's of a 16kHz VBR mono MP3. It's 
supposed to be 70 bytes long.

I had a go at CDex... Definitely better than Audiograbber...
Anyways, I was having a look at its option to write "Riff WAV MP3 files". I like that 
option, but it's flawed. No matter what encoder or sampling rate you use, it always 
writes the header as stereo 44.1kHz. To fix this is a simple hack to change 3 bytes if 
necessary, but I wouldn't want to have to do too many files in one go. Another fix is 
to rename it to MP3.

Here's what I discovered about using such WAV headers-

* Before - VBR MPEG-2 Layer-3 files produced by Lame never seem(ed) to have a VBR tag 
even when I added the switch for it. Winamp tries to keep calculating the time, so if 
you scroll elsewhere in the playlist, it snaps back to the song playing. (Very 
annoying)
  After - Using the WAV headers fixes this problem.

* I tried changing the sample rate in the header so that it didn't match the MPEG 
data. 
** If a "standard" sample rate is chosen - 32kHz, 44.1kHz, 48kHz (as well as half & 
quarter sample rates), most Windoze programs read them fine, but they put out a mickey 
mouse impression (or Lurch impression, depending on if it's faster or slower)
** If a non-standard sample rate is chosen (i.e a stupid sample rate like 55875Hz)...
 Media Player, Active Movie Control, & (Creative's) SoundOle can't read the file,
 Winamp & (Creative's) Wave Studio read the file & put out the same effect as before.
** Cooledit 2000 opened the first few seconds of the file, but refused to load the 
rest (both times).
** MPxPlay loaded the file as an MP3 & ignored the header (both times).
** If the file was renamed to MP3, Winamp played at normal speed again (ignoring the 
header).

* To convert an MP3 to a WAV file containg MP3 data, it's as simple as inserting a 
header such as what's attached (hopefully your email programs won't change the file 
format - it should be 70 bytes long). The last 4 bytes are for the file length of the 
MP3 before you add the header, & the rest (mono/stereo, samplerate in Hz, datarate in 
bytes per second, & filesize) are pretty much the same as in PCM WAVs, though I think 
the polyphony byte may be in a different position. Feel free to use this header, but 
you'll have to modify those parameters I mentioned. It works for both VBR & CBR 
encodings. 

* Unfortunately, Winamp wouldn't read the ID3 tags of WAV files.

By the way, has anyone formed an opinion as to whether Nullsoft's WAV writer is better 
or worse than Fraunhofer's 2S ACM codec to decode such files back to WAV?

And those who've tried it, what do you think of Cooledit's "Quickfilter" function?

Shawn

wav_head.---

Reply via email to