Hi,
So I’ve run into a bit of a problem and I’m quite stuck with it, perhaps someone can point out to me where I’m going wrong.
The game we’re working on uses Multi-Layer events to create a background song of 7 tracks. We can then programmatically trigger the individual tracks volume using the parameters we have set up in the designer.
Below is the code I use to do this.
[code:2by3v1kv]void SoundBank::changeTrackVolume( int index, float value )
{
FMOD_RESULT r;
FMOD::EventParameter* param;
r = sound->getParameterByIndex(index + 1, &param);
checkError(r);
r = param->setValue(value);
checkError(r);
}[/code:2by3v1kv]
Now I’ve run a few checks, and apparently the value of the parameter is being updated, however this doesn’t actually effect the sound at all, indeed if I set all the parameters to 0 it can still be heard!
I have also loaded the event into the event player tool and all of the parameters work as expected in there, I also made sure the eventSystem was updating…
At a bit of a loss on where to go next on this one so if anyone has any idea or insights as to where to go next I would really appreciate it.
Thanks a lot,
Kurt
- codeglue asked 6 years ago
- You must login to post comments
So typically 30 minutes after posting I figured it out,
I was setting the number of output channels in the System::setSoftwareFormat() to 2 so it wasn’t working, changed it to 0 and all is well.
Hopefully this will save some people a bit of stress.
Cheers,
Kurt
- codeglue answered 6 years ago
- You must login to post comments
Please login first to submit.