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?

Thanks

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.