# Controlling channel volumes in 12 channel AIFF file

**URL:** <https://qa.fmod.com/t/controlling-channel-volumes-in-12-channel-aiff-file/18068>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [December 8, 2021, 2:52pm UTC](https://qa.fmod.com/t/controlling-channel-volumes-in-12-channel-aiff-file/18068 "2021-12-08T14:52:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bowener](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bowener](https://qa.fmod.com/u/bowener)\
**Post date:** [December 8, 2021, 2:52pm UTC](https://qa.fmod.com/t/controlling-channel-volumes-in-12-channel-aiff-file/18068/1 "2021-12-08T14:52:03Z")

</div>

I have a 12 channel AIFF file withe 6 stereo pairs that I am trying to control using chan-\>setMixLevelsInput. I cannot control anything past the first 4 stereo pairs ( channels index (0 → 7). Other comments in the forum references to using the speaker map (AllStereo) in the FMOD\_CREATESOUNDEXINFO, but that has been deprecated. I’m sure that there must be a way to ensure that all 12 channels are addressable, but I can’t find any documentation or code examples as to how to make that happen. Any help or guidance would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [December 13, 2021, 11:45pm UTC](https://qa.fmod.com/t/controlling-channel-volumes-in-12-channel-aiff-file/18068/2 "2021-12-13T23:45:25Z")

</div>

Thank you for reporting, I have reproduced this issue with the latest version and there appears to be a bug in `Channel::setMixLevelsInput`. Are you mapping your 12 channel file to 12 different outputs or just down to stereo?  
You can try using [`ChannelControl::setMixMatrix`](https://fmod.com/resources/documentation-api?version=2.02&page=core-api-channelcontrol.html#channelcontrol_setmixmatrix) to map the input mix levels to your desired outputs. Here is an example of mapping a 12 channel file to a stereo output:

```cpp
system->playSound(sound1, 0, true, &channel);

// 2 output rows, 12 input columns
float matrix[2][12] = {
	{1.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 0.5f, 0.3f}, // Channel 1 left speaker full, ch2 10%L, ch3 20%L, ch4 30%L etc
	{0.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.1f, 0.5f, 0.3f}, // Channel 1 mute right, ch2 90%R, ch3 80%R, ch4 70%R etc
};

channel->setMixMatrix(&matrix[0][0], 2, 12);

```

---

<div class="post-metadata">

**Author:** ![bowener](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bowener](https://qa.fmod.com/u/bowener)\
**Post date:** [December 15, 2021, 7:07am UTC](https://qa.fmod.com/t/controlling-channel-volumes-in-12-channel-aiff-file/18068/3 "2021-12-15T07:07:09Z")

</div>

Using the latest download of fmod and fmod studio. Thanks for verifying this behaviour. The speaker matrix solution is a workable stop gap, but it would even more user friendly to have an “all stereo” mode for a channel that would override the automatic mapping to the various surround formats and allow mixes for multiple parallel stereo pairs in multichannel audio files with more than 8 channels. Thanks!

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [December 15, 2021, 11:33pm UTC](https://qa.fmod.com/t/controlling-channel-volumes-in-12-channel-aiff-file/18068/4 "2021-12-15T23:33:01Z")

</div>

At the moment it looks like it just does a 1-1 mapping of n channels to n speakers; I agree it would be nice to have a downmix option on `setMixLevelsInput` which lets you test on whatever output device you have available. Thanks for the suggestion, I will pass it along to the dev team.
