2 * OpenAL cross platform audio library
3 * Copyright (C) 1999-2010 by authors.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 * Or go to http://www.gnu.org/copyleft/lgpl.html
36 void ComputeAngleGains(const ALCdevice
*device
, ALfloat angle
, ALfloat elevation
, ALfloat ingain
, ALfloat gains
[MAX_OUTPUT_CHANNELS
])
39 sinf(angle
) * cosf(elevation
),
41 -cosf(angle
) * cosf(elevation
)
43 ComputeDirectionalGains(device
, dir
, ingain
, gains
);
46 void ComputeDirectionalGains(const ALCdevice
*device
, const ALfloat dir
[3], ALfloat ingain
, ALfloat gains
[MAX_OUTPUT_CHANNELS
])
48 ALfloat coeffs
[MAX_AMBI_COEFFS
];
50 /* Convert from OpenAL coords to Ambisonics. */
55 coeffs
[0] = 0.7071f
; /* sqrt(1.0 / 2.0) */
56 coeffs
[1] = x
; /* X */
57 coeffs
[2] = y
; /* Y */
58 coeffs
[3] = z
; /* Z */
59 coeffs
[4] = 0.5f
* (3.0f
*z
*z
- 1.0f
); /* 0.5 * (3*Z*Z - 1) */
60 coeffs
[5] = 2.0f
* z
* x
; /* 2*Z*X */
61 coeffs
[6] = 2.0f
* y
* z
; /* 2*Y*Z */
62 coeffs
[7] = x
*x
- y
*y
; /* X*X - Y*Y */
63 coeffs
[8] = 2.0f
* x
* y
; /* 2*X*Y */
64 coeffs
[9] = 0.5f
* z
* (5.0f
*z
*z
- 3.0f
); /* 0.5 * Z * (5*Z*Z - 3) */
65 coeffs
[10] = 0.7262f
* x
* (5.0f
*z
*z
- 1.0f
); /* sqrt(135.0 / 256.0) * X * (5*Z*Z - 1) */
66 coeffs
[11] = 0.7262f
* y
* (5.0f
*z
*z
- 1.0f
); /* sqrt(135.0 / 256.0) * Y * (5*Z*Z - 1) */
67 coeffs
[12] = 2.5981f
* z
* (x
*x
- y
*y
); /* sqrt(27.0 / 4.0) * Z * (X*X - Y*Y) */
68 coeffs
[13] = 5.1962f
* x
* y
* z
; /* sqrt(27) * X * Y * Z */
69 coeffs
[14] = x
* (x
*x
- 3.0f
*y
*y
); /* X * (X*X - 3*Y*Y) */
70 coeffs
[15] = y
* (3.0f
*x
*x
- y
*y
); /* Y * (3*X*X - Y*Y) */
72 for(i
= 0;i
< MAX_OUTPUT_CHANNELS
;i
++)
74 for(i
= 0;i
< device
->NumChannels
;i
++)
76 for(j
= 0;j
< MAX_AMBI_COEFFS
;j
++)
77 gains
[i
] += device
->Channel
[i
].HOACoeff
[j
]*coeffs
[j
];
78 gains
[i
] = maxf(gains
[i
], 0.0f
) * ingain
;
82 void ComputeAmbientGains(const ALCdevice
*device
, ALfloat ingain
, ALfloat gains
[MAX_OUTPUT_CHANNELS
])
86 for(i
= 0;i
< MAX_OUTPUT_CHANNELS
;i
++)
88 for(i
= 0;i
< device
->NumChannels
;i
++)
89 gains
[i
] = device
->Channel
[i
].HOACoeff
[0] * ingain
;
92 void ComputeBFormatGains(const ALCdevice
*device
, const ALfloat mtx
[4], ALfloat ingain
, ALfloat gains
[MAX_OUTPUT_CHANNELS
])
96 for(i
= 0;i
< MAX_OUTPUT_CHANNELS
;i
++)
98 for(i
= 0;i
< device
->NumChannels
;i
++)
101 gains
[i
] += device
->Channel
[i
].FOACoeff
[j
] * mtx
[j
];
107 typedef struct ChannelMap
{
108 enum Channel ChanName
;
109 ChannelConfig Config
;
112 static void SetChannelMap(ALCdevice
*device
, const ChannelMap
*chanmap
, size_t count
)
116 for(i
= 0;i
< MAX_OUTPUT_CHANNELS
&& device
->ChannelName
[i
] != InvalidChannel
;i
++)
118 if(device
->ChannelName
[i
] == LFE
)
120 device
->Channel
[i
].Angle
= 0.0f
;
121 device
->Channel
[i
].Elevation
= 0.0f
;
122 for(j
= 0;j
< MAX_AMBI_COEFFS
;j
++)
123 device
->Channel
[i
].HOACoeff
[j
] = 0.0f
;
125 device
->Channel
[i
].FOACoeff
[j
] = 0.0f
;
129 for(j
= 0;j
< count
;j
++)
131 if(device
->ChannelName
[i
] == chanmap
[j
].ChanName
)
133 device
->Channel
[i
] = chanmap
[j
].Config
;
138 ERR("Failed to match channel "SZFMT
" (label %d) in config\n", i
, device
->ChannelName
[i
]);
140 device
->NumChannels
= i
;
143 static bool LoadChannelSetup(ALCdevice
*device
)
145 static const char *mono_names
[1] = {
147 }, *stereo_names
[2] = {
148 "front-left", "front-right"
149 }, *quad_names
[4] = {
150 "front-left", "front-right",
151 "back-left", "back-right"
152 }, *surround51_names
[5] = {
153 "front-left", "front-right",
155 "side-left", "side-right"
156 }, *surround51rear_names
[5] = {
157 "front-left", "front-right",
159 "back-left", "back-right"
160 }, *surround61_names
[6] = {
161 "front-left", "front-right",
162 "front-center", "back-center",
163 "side-left", "side-right"
164 }, *surround71_names
[7] = {
165 "front-left", "front-right",
167 "back-left", "back-right",
168 "side-left", "side-right"
170 ChannelMap chanmap
[MAX_OUTPUT_CHANNELS
];
171 const char **channames
= NULL
;
172 const char *layout
= NULL
;
176 switch(device
->FmtChans
)
180 channames
= mono_names
;
181 count
= COUNTOF(mono_names
);
185 channames
= stereo_names
;
186 count
= COUNTOF(stereo_names
);
190 channames
= quad_names
;
191 count
= COUNTOF(quad_names
);
194 layout
= "surround51";
195 channames
= surround51_names
;
196 count
= COUNTOF(surround51_names
);
199 layout
= "surround51rear";
200 channames
= surround51rear_names
;
201 count
= COUNTOF(surround51rear_names
);
204 layout
= "surround61";
205 channames
= surround61_names
;
206 count
= COUNTOF(surround61_names
);
209 layout
= "surround71";
210 channames
= surround71_names
;
211 count
= COUNTOF(surround71_names
);
220 snprintf(name
, sizeof(name
), "%s/enable", layout
);
221 if(!GetConfigValueBool("layouts", name
, 0))
225 for(i
= 0;i
< count
;i
++)
227 const char *channame
= channames
[i
];
232 snprintf(chanlayout
, sizeof(chanlayout
), "%s/%s", layout
, channame
);
233 if(!ConfigValueStr("layouts", chanlayout
, &value
))
235 ERR("Missing channel %s\n", channame
);
238 props
= sscanf(value
, " %f %f ; %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f ; %f %f %f %f",
239 &chanmap
[i
].Config
.Angle
, &chanmap
[i
].Config
.Elevation
,
240 &chanmap
[i
].Config
.HOACoeff
[0], &chanmap
[i
].Config
.HOACoeff
[1], &chanmap
[i
].Config
.HOACoeff
[2],
241 &chanmap
[i
].Config
.HOACoeff
[3], &chanmap
[i
].Config
.HOACoeff
[4], &chanmap
[i
].Config
.HOACoeff
[5],
242 &chanmap
[i
].Config
.HOACoeff
[6], &chanmap
[i
].Config
.HOACoeff
[7], &chanmap
[i
].Config
.HOACoeff
[8],
243 &chanmap
[i
].Config
.HOACoeff
[9], &chanmap
[i
].Config
.HOACoeff
[10], &chanmap
[i
].Config
.HOACoeff
[11],
244 &chanmap
[i
].Config
.HOACoeff
[12], &chanmap
[i
].Config
.HOACoeff
[13], &chanmap
[i
].Config
.HOACoeff
[14],
245 &chanmap
[i
].Config
.HOACoeff
[15], &chanmap
[i
].Config
.FOACoeff
[0], &chanmap
[i
].Config
.FOACoeff
[1],
246 &chanmap
[i
].Config
.FOACoeff
[2], &chanmap
[i
].Config
.FOACoeff
[3]);
249 ERR("Failed to parse channel "SZFMT
" properties\n", i
);
253 if(strcmp(channame
, "front-left") == 0)
254 chanmap
[i
].ChanName
= FrontLeft
;
255 else if(strcmp(channame
, "front-right") == 0)
256 chanmap
[i
].ChanName
= FrontRight
;
257 else if(strcmp(channame
, "front-center") == 0)
258 chanmap
[i
].ChanName
= FrontCenter
;
259 else if(strcmp(channame
, "back-left") == 0)
260 chanmap
[i
].ChanName
= BackLeft
;
261 else if(strcmp(channame
, "back-right") == 0)
262 chanmap
[i
].ChanName
= BackRight
;
263 else if(strcmp(channame
, "back-center") == 0)
264 chanmap
[i
].ChanName
= BackCenter
;
265 else if(strcmp(channame
, "side-left") == 0)
266 chanmap
[i
].ChanName
= SideLeft
;
267 else if(strcmp(channame
, "side-right") == 0)
268 chanmap
[i
].ChanName
= SideRight
;
272 ERR("Failed to parse channel %s elements (expected 22, got %d\n", channame
, props
);
277 if(!(chanmap
[i
].Config
.Angle
>= -180.0f
&& chanmap
[i
].Config
.Angle
<= 180.0f
))
279 ERR("Channel %s angle is out of range (%f not within -180...+180 degrees)\n", channame
, chanmap
[i
].Config
.Angle
);
282 chanmap
[i
].Config
.Angle
= DEG2RAD(chanmap
[i
].Config
.Angle
);
284 if(!(chanmap
[i
].Config
.Elevation
>= -180.0f
&& chanmap
[i
].Config
.Elevation
<= 180.0f
))
286 ERR("Channel %s elevation is out of range (%f not within -180...+180 degrees)\n", channame
, chanmap
[i
].Config
.Angle
);
289 chanmap
[i
].Config
.Elevation
= DEG2RAD(chanmap
[i
].Config
.Elevation
);
292 SetChannelMap(device
, chanmap
, count
);
296 ALvoid
aluInitPanning(ALCdevice
*device
)
298 static const ChannelMap MonoCfg
[1] = {
299 { FrontCenter
, { DEG2RAD( 0.0f
), DEG2RAD(0.0f
), { 1.4142f
}, { 1.4142f
} } },
301 { FrontLeft
, { DEG2RAD( -90.0f
), DEG2RAD(0.0f
), { 0.7071f
, 0.0f
, 0.5f
, 0.0f
}, { 0.7071f
, 0.0f
, 0.5f
, 0.0f
} } },
302 { FrontRight
, { DEG2RAD( 90.0f
), DEG2RAD(0.0f
), { 0.7071f
, 0.0f
, -0.5f
, 0.0f
}, { 0.7071f
, 0.0f
, -0.5f
, 0.0f
} } },
304 { FrontLeft
, { DEG2RAD( -45.0f
), DEG2RAD(0.0f
), { 0.353558f
, 0.306181f
, 0.306192f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, 0.117183f
}, { 0.353553f
, 0.250000f
, 0.250000f
, 0.0f
} } },
305 { FrontRight
, { DEG2RAD( 45.0f
), DEG2RAD(0.0f
), { 0.353543f
, 0.306181f
, -0.306192f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, -0.117193f
}, { 0.353553f
, 0.250000f
, -0.250000f
, 0.0f
} } },
306 { BackLeft
, { DEG2RAD(-135.0f
), DEG2RAD(0.0f
), { 0.353543f
, -0.306192f
, 0.306181f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, -0.117193f
}, { 0.353553f
, -0.250000f
, 0.250000f
, 0.0f
} } },
307 { BackRight
, { DEG2RAD( 135.0f
), DEG2RAD(0.0f
), { 0.353558f
, -0.306192f
, -0.306181f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, 0.117183f
}, { 0.353553f
, -0.250000f
, -0.250000f
, 0.0f
} } },
309 { FrontLeft
, { DEG2RAD( -30.0f
), DEG2RAD(0.0f
), { 0.208954f
, 0.212846f
, 0.238350f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.017738f
, 0.204014f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.051023f
, 0.047490f
}, { 0.208954f
, 0.162905f
, 0.182425f
, 0.0f
} } },
310 { FrontRight
, { DEG2RAD( 30.0f
), DEG2RAD(0.0f
), { 0.208954f
, 0.212846f
, -0.238350f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.017738f
, -0.204014f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.051023f
, -0.047490f
}, { 0.208954f
, 0.162905f
, -0.182425f
, 0.0f
} } },
311 { FrontCenter
, { DEG2RAD( 0.0f
), DEG2RAD(0.0f
), { 0.109403f
, 0.179490f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.142031f
, -0.000002f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.072024f
, -0.000001f
}, { 0.109403f
, 0.137375f
, 0.000000f
, 0.0f
} } },
312 { SideLeft
, { DEG2RAD(-110.0f
), DEG2RAD(0.0f
), { 0.470936f
, -0.369626f
, 0.349386f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.031375f
, -0.058144f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.007119f
, -0.043968f
}, { 0.470934f
, -0.282903f
, 0.267406f
, 0.0f
} } },
313 { SideRight
, { DEG2RAD( 110.0f
), DEG2RAD(0.0f
), { 0.470936f
, -0.369626f
, -0.349386f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.031375f
, 0.058144f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.007119f
, 0.043968f
}, { 0.470934f
, -0.282903f
, -0.267406f
, 0.0f
} } },
315 { FrontLeft
, { DEG2RAD( -30.0f
), DEG2RAD(0.0f
), { 0.208954f
, 0.212846f
, 0.238350f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.017738f
, 0.204014f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.051023f
, 0.047490f
}, { 0.208954f
, 0.162905f
, 0.182425f
, 0.0f
} } },
316 { FrontRight
, { DEG2RAD( 30.0f
), DEG2RAD(0.0f
), { 0.208954f
, 0.212846f
, -0.238350f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.017738f
, -0.204014f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.051023f
, -0.047490f
}, { 0.208954f
, 0.162905f
, -0.182425f
, 0.0f
} } },
317 { FrontCenter
, { DEG2RAD( 0.0f
), DEG2RAD(0.0f
), { 0.109403f
, 0.179490f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.142031f
, -0.000002f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.072024f
, -0.000001f
}, { 0.109403f
, 0.137375f
, 0.000000f
, 0.0f
} } },
318 { BackLeft
, { DEG2RAD(-110.0f
), DEG2RAD(0.0f
), { 0.470936f
, -0.369626f
, 0.349386f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.031375f
, -0.058144f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.007119f
, -0.043968f
}, { 0.470934f
, -0.282903f
, 0.267406f
, 0.0f
} } },
319 { BackRight
, { DEG2RAD( 110.0f
), DEG2RAD(0.0f
), { 0.470936f
, -0.369626f
, -0.349386f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.031375f
, 0.058144f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.007119f
, 0.043968f
}, { 0.470934f
, -0.282903f
, -0.267406f
, 0.0f
} } },
321 { FrontLeft
, { DEG2RAD( -30.0f
), DEG2RAD(0.0f
), { 0.167065f
, 0.200583f
, 0.172695f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.029855f
, 0.186407f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.039241f
, 0.068910f
}, { 0.167065f
, 0.153519f
, 0.132175f
, 0.0f
} } },
322 { FrontRight
, { DEG2RAD( 30.0f
), DEG2RAD(0.0f
), { 0.167065f
, 0.200583f
, -0.172695f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.029855f
, -0.186407f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.039241f
, -0.068910f
}, { 0.167065f
, 0.153519f
, -0.132175f
, 0.0f
} } },
323 { FrontCenter
, { DEG2RAD( 0.0f
), DEG2RAD(0.0f
), { 0.109403f
, 0.179490f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.142031f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.072024f
, -0.000001f
}, { 0.109403f
, 0.137375f
, 0.000000f
, 0.0f
} } },
324 { BackCenter
, { DEG2RAD( 180.0f
), DEG2RAD(0.0f
), { 0.353556f
, -0.461940f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.165723f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, 0.000005f
}, { 0.353556f
, -0.353554f
, 0.000000f
, 0.0f
} } },
325 { SideLeft
, { DEG2RAD( -90.0f
), DEG2RAD(0.0f
), { 0.289151f
, -0.081301f
, 0.401292f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.188208f
, -0.071420f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.010099f
, -0.032897f
}, { 0.289151f
, -0.062225f
, 0.307136f
, 0.0f
} } },
326 { SideRight
, { DEG2RAD( 90.0f
), DEG2RAD(0.0f
), { 0.289151f
, -0.081301f
, -0.401292f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.188208f
, 0.071420f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.010099f
, 0.032897f
}, { 0.289151f
, -0.062225f
, -0.307136f
, 0.0f
} } },
328 { FrontLeft
, { DEG2RAD( -30.0f
), DEG2RAD(0.0f
), { 0.167065f
, 0.200583f
, 0.172695f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.029855f
, 0.186407f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.039241f
, 0.068910f
}, { 0.167065f
, 0.153519f
, 0.132175f
, 0.0f
} } },
329 { FrontRight
, { DEG2RAD( 30.0f
), DEG2RAD(0.0f
), { 0.167065f
, 0.200583f
, -0.172695f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.029855f
, -0.186407f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.039241f
, -0.068910f
}, { 0.167065f
, 0.153519f
, -0.132175f
, 0.0f
} } },
330 { FrontCenter
, { DEG2RAD( 0.0f
), DEG2RAD(0.0f
), { 0.109403f
, 0.179490f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.142031f
, 0.000000f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.072024f
, 0.000000f
}, { 0.109403f
, 0.137375f
, 0.000000f
, 0.0f
} } },
331 { BackLeft
, { DEG2RAD(-150.0f
), DEG2RAD(0.0f
), { 0.224752f
, -0.295009f
, 0.170325f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.105349f
, -0.182473f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, 0.065799f
}, { 0.224752f
, -0.225790f
, 0.130361f
, 0.0f
} } },
332 { BackRight
, { DEG2RAD( 150.0f
), DEG2RAD(0.0f
), { 0.224752f
, -0.295009f
, -0.170325f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.105349f
, 0.182473f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, -0.065799f
}, { 0.224752f
, -0.225790f
, -0.130361f
, 0.0f
} } },
333 { SideLeft
, { DEG2RAD( -90.0f
), DEG2RAD(0.0f
), { 0.224739f
, 0.000002f
, 0.340644f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.210697f
, 0.000002f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, -0.065795f
}, { 0.224739f
, 0.000000f
, 0.260717f
, 0.0f
} } },
334 { SideRight
, { DEG2RAD( 90.0f
), DEG2RAD(0.0f
), { 0.224739f
, 0.000002f
, -0.340644f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, -0.210697f
, -0.000002f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.0f
, 0.000000f
, 0.065795f
}, { 0.224739f
, 0.000000f
, -0.260717f
, 0.0f
} } },
336 const ChannelMap
*chanmap
= NULL
;
339 memset(device
->Channel
, 0, sizeof(device
->Channel
));
340 device
->NumChannels
= 0;
342 if(LoadChannelSetup(device
))
345 switch(device
->FmtChans
)
348 count
= COUNTOF(MonoCfg
);
353 count
= COUNTOF(StereoCfg
);
358 count
= COUNTOF(QuadCfg
);
363 count
= COUNTOF(X51SideCfg
);
364 chanmap
= X51SideCfg
;
368 count
= COUNTOF(X51RearCfg
);
369 chanmap
= X51RearCfg
;
373 count
= COUNTOF(X61Cfg
);
378 count
= COUNTOF(X71Cfg
);
383 SetChannelMap(device
, chanmap
, count
);