Multichannel Audio FIles - volume mixing by channel

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?


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.

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?

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

ended up just leaving it out ^^;