0
0

I hava Created an event in Fmod Studio like this:
1)prepare three music
2)there are three audio track,and three music has been added into track
3)add marker, tempo makrer,transition region for each track.
4)add a parameter named “demo” ,set it’s min value to 0,and max value to 30.
5)click the first and the second transition region and add a condition param which value is 0 up to 1,1.1 up to 2
6)prepare an application,put three buttons on it .the button one is used for starting play music. button two and button three are used for switching music.

In fmod studio,when i chang the “demo” param value,then the timeline cursor jump to the marker pointed by transition region immediately,and the music swiched gapless.

But in my code,there is no effective after i setted the parameter “demo” value in button click event function.my code like this:

void CFmodDemoDlg::OnBnClickedBtnFirst()
{
demoEventInstance->start();
studioSystem->update();
}

void CFmodDemoDlg::OnBnClickedBtnSecond()
{
FMOD_RESULT result;
result = demoEventInstance->setParameterValue("transcate", 0.5);
studioSystem->update();
result=demoEventInstance->triggerCue();
}

void CFmodDemoDlg::OnBnClickedBtnThird()
{
FMOD_RESULT result;
result=demoEventInstance->setParameterValue("transcate", 1.5);
studioSystem->update();
result=demoEventInstance->triggerCue();
}

it seems that only button three can play music after click it.

So,is there someone can help me ?
thousands of thanks.

  • Kris Lau

    It’s working,but i still don’t understand what happens

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.