# Multichannel Audio FIles - volume mixing by channel

**URL:** <https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697>\
**Category:** FMOD Engine\
**Created:** [January 27, 2021, 10:03pm UTC](https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697 "2021-01-27T22:03:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidRovin](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@DavidRovin](https://qa.fmod.com/u/DavidRovin)\
**Post date:** [January 27, 2021, 10:03pm UTC](https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697/1 "2021-01-27T22:03:33Z")

</div>

Our game is very old and does not use the FMOD Studio layer. We have home grown code written on top of the core audio API (Ver 4.44.23 ).

We are trying to simulate adaptive music by streaming a 4 channel file and mixing between the 2 stereo pairs. This is because our system cannot guarantee sync for files triggered separately.

I see that the System::createStream can create multichannel streams. But i could not find any methods for setting volume levels using channel index.

Does that exist. Am i going about this the wrong way?

Thanks

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [January 28, 2021, 1:34am UTC](https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697/2 "2021-01-28T01:34:19Z")

</div>

FMOD Ex is quite out of support now but I can probably point you in the right direction.

Firstly to get your 4 channel audio file to behave as stereo pairs you’ll want to use FMOD\_CREATESOUNDEXINFO::speakermap and specify FMOD\_SPEAKERMAPTYPE\_ALLSTEREO. Then you can use Channel::setInputChannelMix, it takes an array of floats representing the levels of each channel in the source file. So if you are playing a 4 channel file, pass in an array of four float representing the linear volume for each.

---

<div class="post-metadata">

**Author:** ![TorutheRedFox](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/torutheredfox/32/5255_2.png) [@TorutheRedFox](https://qa.fmod.com/u/TorutheRedFox)\
**Post date:** [January 3, 2022, 12:50pm UTC](https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697/3 "2022-01-03T12:50:06Z")

</div>

I’m also having some issues with multichannel audio and FMOD 4

for me, despite having those options set, it still only plays the first stereo pair  
am I missing some more options apart from those?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [January 4, 2022, 12:19am UTC](https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697/4 "2022-01-04T00:19:35Z")

</div>

As mentioned above, FMOD Ex is no longer supported so we’re not in a position to debug why it isn’t working for you. However I can suggest taking a look at Channel::setSpeakerLevels if you want to take full control of the routing for a particular sound.

---

<div class="post-metadata">

**Author:** ![TorutheRedFox](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/torutheredfox/32/5255_2.png) [@TorutheRedFox](https://qa.fmod.com/u/TorutheRedFox)\
**Post date:** [January 4, 2022, 12:16pm UTC](https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697/5 "2022-01-04T12:16:25Z")

</div>

> [@mathew](#):
>
> As mentioned above, FMOD Ex is no longer supported so we’re not in a position to debug why it isn’t working for you. However I can suggest taking a look at Channel::setSpeakerLevels if you want to take full control of the routing for a particular sound.

I removed a System::setSoftwareFormat call and it now works  
looks like I’ve set something wrong there

---

<div class="post-metadata">

**Author:** ![TorutheRedFox](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/torutheredfox/32/5255_2.png) [@TorutheRedFox](https://qa.fmod.com/u/TorutheRedFox)\
**Post date:** [January 4, 2022, 1:50pm UTC](https://qa.fmod.com/t/multichannel-audio-files-volume-mixing-by-channel/16697/6 "2022-01-04T13:50:46Z")

</div>

ended up just leaving it out ^^;
