[Ardour-Users] Ardour 3.0 beta 1a - Channel Map in wav file header

Roger James roger at beardandsandals.co.uk
Fri Dec 9 06:24:51 PST 2011

On 09/12/11 13:18, Paul Davis wrote:
> On Fri, Dec 9, 2011 at 8:06 AM, Roger James<roger at beardandsandals.co.uk>  wrote:
>> Hi,
>> I there any way to specify the wav file header channel map field when doing
>> multichannel exports?
> pointer to spec?
Hi Paul,


and look for dwChannelMap. For info here is a piece of code from aften 
that guesses at a default channel mask from the number of channels if no 
mask is specified when it is reading a wav file.

                // make up channel mask if not using WAVE_FORMAT_EXTENSIBLE
                 // or if ch_mask is set to zero (unspecified configuration)
                 // TODO: select default configurations for >6 channels
                 if(pf->ch_mask == 0) {
                     switch(pf->channels) {
                         case 1: pf->ch_mask = 0x04;  break;
                         case 2: pf->ch_mask = 0x03;  break;
                         case 3: pf->ch_mask = 0x07;  break;
                         case 4: pf->ch_mask = 0x107; break;
                         case 5: pf->ch_mask = 0x37;  break;
                         case 6: pf->ch_mask = 0x3F;  break;

Is that what meant?


More information about the Ardour-Users mailing list