The windows binaries from Rarewares have many problems with channel mapping.
The sources don't coincide with vorbis-tools 1.4.0, at least with the necesary remap of multichannel wav input.
in audio.c vorbis-tools 1.4.0 there are:
static int wav_permute_matrix[8][8] =
{
{0}, /* 1.0 mono */
{0,1}, /* 2.0 stereo */
{0,2,1}, /* 3.0 channel ('wide') stereo */
{0,1,2,3}, /* 4.0 discrete quadraphonic */
{0,2,1,3,4}, /* 5.0 surround */
{0,2,1,4,5,3}, /* 5.1 surround */
{0,2,1,4,5,6,3}, /* 6.1 surround */
{0,2,1,6,7,4,5,3} /* 7.1 surround (classic theater 8-track) */
};
with support until 8 channels, and the same matrix in oggenc2.85srcs is only for 6 channels:
static int wav_permute_matrix[6][6] =
{
{0},
{0,1},
{0,2,1},
{0,1,2,3},
{0,2,1,3,4},
{0,2,1,4,5,3}
};
After vorbis-tools 1.4.0 use the matrix always for wavs until 8 channels:
if (wav->channels <= 8)
/* Where we know the mappings, use them. */
memcpy(wav->channel_permute, wav_permute_matrix[wav->channels-1],
sizeof(int) * wav->channels);
else
/* Use a default 1-1 mapping */
for (i=0; i < wav->channels; i++)
wav->channel_permute[i] = i;
But oggenc2.85srcs use the matrix only with a few MaskChannel and never if the wav don't have WAVE_FORMAT_EXTENSIBLE header:
if (wav->channel_map)
/* Where we know the mappings, use them. */
memcpy(wav->channel_permute, wav_permute_matrix[wav->channels-1], sizeof(int) * wav->channels);
else
/* Use a default 1-1 mapping */
for (i=0; i < wav->channels; i++)
wav->channel_permute[i] = i;
Please, anybody can compile (for windows) vorbis-tools 1.4.0 without changes to test the differences?