HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: Egor on 2006-10-10 21:35:15

Title: WAVEFORMATEXTENSIBLE
Post by: Egor on 2006-10-10 21:35:15
Hello,

why doesn't foobar2000 write multichannel WAV files in WAVEFORMATEXTENSIBLE (http://windowssdk.msdn.microsoft.com/en-us/library/ms713496.aspx) format?

Is it a bug?
Title: WAVEFORMATEXTENSIBLE
Post by: foosion on 2006-10-11 09:39:19
No, it is a design choice. Several commandline encoders don't support WAV files with this format as far as I know.
Title: WAVEFORMATEXTENSIBLE
Post by: Egor on 2006-10-11 11:09:30
Ironically, there are encoders that require multichannel WAV to be in WAVEFORMATEXTENSIBLE, such as Windows Media Encoder and the new FLAC 1.1.3. Additionally, the WAVEFORMATEX (http://windowssdk.msdn.microsoft.com/en-us/library/ms713497.aspx) officially supports up to only 2 channels:
Quote
The WAVEFORMATEX structure defines the format of waveform-audio data. Only format information common to all waveform-audio data formats is included in this structure. For formats that require additional information, this structure is included as the first member in another structure, along with the additional information.

Formats that support more than two channels or sample sizes of more than 16 bits can be described in a WAVEFORMATEXTENSIBLE structure, which includes the WAVEFORMAT structure.
[...]
nChannels

Number of channels in the waveform-audio data. Monaural data uses one channel and stereo data uses two channels.

Wouldn't it be optimal (compatible) to write mono and stereo WAVs in WAVEFORMATEX, and the others in WAVEFORMATEXTENSIBLE?