Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WAV compatibility (Read 884 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WAV compatibility

Not many people seem to be aware of it, but WAV/RIFF is a container format, that can contain a variety of codecs, one of which is MP3.

I'm wondering about hardware compatibility with it, though. Some media players list the formats they support, most can do WAV and MP3, and possibly a bunch others. But is there some sort of minimum requirement list to be "fully WAV compatible" or do they just mean PCM?
Some of the codecs that can be put into .wav are more obscure, like GSM 6.10 or Truespeech. When a device is "WAV compatible" can I assume it reads all the codecs able to be contained in a .wav file, or is there no such requirement protocol?

I guess the best way is to have a set of .wav files on some sort of medium that player accepts and just test it all out, isn't it…

Re: WAV compatibility

Reply #1
I'm sure they mean regular uncompressed PCM.    Even then there could be limits on the sample rate or number of channels, and it might not support floating-point.

...I know WAV is supposed to be a "container" but I've never actually seen a WAV file that didn't have regular-old PCM.

Re: WAV compatibility

Reply #2
It is impractical for a device to implement and in some cases license dozens of formats. Besides the codecs that Microsoft has shipped, nearly every format in existence has been put into a WAV wrapper at one point. The player will only support PCM, and might not even recognize MP3 even if a plain stream is supported.

Re: WAV compatibility

Reply #3
OK, I was just wondering if there is like a "must implement" list of codecs to be accepting of WAV/RIFF compatibility. Apparently it isn't.

@DVDdoug I've seen ADPCM in .wav files, though.

Re: WAV compatibility

Reply #4
I have come across one ADPCM-encoded bootleg recording in the wild. Why it was used ... who knows. Maybe some smart-ass found out that if I hit this genius checkbox, the .wav becomes much smaller ...

I once tested to see if players would accept mp3-in-wav. Mixed bag to say the least. But I don't know if there is a unique way to do the remuxing, and if that version of ffmpeg would default to the most compatible.
... why even try except for curiosity? Spoiler (click to show/hide)
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: WAV compatibility

Reply #5
The device might implement one or another of these codecs if it has an application for it. For example, it could provide "long play" recording to IMA ADPCM with minimal hardware. But the majority of these historic codecs have been superceded.

I've encountered a MS-ADPCM transcode into MP3 format with the characteristic distortion on fades. Maybe the person who ripped the tracks had their finger or mouse wheel slip in the format selection box. Very long time ago, when mp3 was being targeted by the rights holders, music on multimedia CDs with video game magazines sometimes came in adpcm format.

Re: WAV compatibility

Reply #6
If I understand the standard correctly: https://www.thewelltemperedcomputer.com/Lib/WavSpec.txt
It is a container indeed.
A RIFF form is a chunk with a RIFF chunk ID.
One of the RIFF forms is Waveform Audio Format

Inside de WAV there is a format tag
    wFormatTag Value         Format Category
     WAVE_FORMAT_PCM (0x0001) Microsoft Pulse Code
                              Modulation (PCM) format


     The following are the registered proprietary WAVE
     format categories:


     wFormatTag Value         Format Category
     IBM_FORMAT_MULAW         IBM mu-law format
     (0x0101)
     IBM_FORMAT_ALAW (0x0102) IBM a-law format
     IBM_FORMAT_ADPCM         IBM AVC Adaptive
     (0x0103)                 Differential Pulse Code
                              Modulation format

What I expect a media player to do:
Open the container
Ignore everything (PAL, RDIB, etc) until the chunk with the Waveform Audio Format is encountered.
Read the header (number of channels, sample rate etc
Play the PCM (doubt if any media player understand the IMB_Format tags)
So it will be PCM only, not any other audio format.
TheWellTemperedComputer.com

Re: WAV compatibility

Reply #7
music on multimedia CDs with video game magazines sometimes came in adpcm format.
Was ADPCM used in games sounds? If so, that could explain what files they had actually acquired.
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: WAV compatibility

Reply #8
I have come across one ADPCM-encoded bootleg recording in the wild. Why it was used ... who knows. Maybe some smart-ass found out that if I hit this genius checkbox, the .wav becomes much smaller ...
The ADPCM in WAVs I've seen was mainly alert sounds and announcements for cockpit instrumentation.

Quote
I once tested to see if players would accept mp3-in-wav. Mixed bag to say the least. But I don't know if there is a unique way to do the remuxing, and if that version of ffmpeg would default to the most compatible.
... why even try except for curiosity? Spoiler (click to show/hide)
The main reason why I'm curious, is because there seems to be little of a requirement catalog, which is however normally the case.
Hence if there was, technically all older players able to play .wav files would technically be required to decode all contained supported formats. Too bad that isn't the case. I thought that at least it was some interesting curiosity to check each time I stumble over it.

Anyway, the idea about giving it to audiophiles and having them enjoy an MP3 and then the exact same MP3 inside a WAV would be fun to watch, as they'd clearly hear the superior quality of the WAV over the MP3…

Too much hassle for one winter evening for me, though. But perhaps something I'll do when they get on my nerves real bad again.