0
0

Hi Folks,

I am moving from the Fmod Ex api to the designer API at the moment.

I am trying to set the master volume for all sounds (a user setting for the game). Previously I had set the volume like so: –

[code:1qhljfe1]FMOD::ChannelGroup *channelGroup;

_fmodSystem->getMasterChannelGroup(&channelGroup);
channelGroup->setVolume(volume);[/code:1qhljfe1]

This doesn’t seem to work on the designer API (after getting the _fmodSystem using _eventsystem->getSystemObject(&_fmodSystem); )

Is there a different way to set the overall volume?

Thanks for your help
All the best,
Ash

  • You must to post comments
0
0

Still can’t quite figure this out, any ideas what I could be doing wrong?

  • You must to post comments
0
0

The eventsystem API doesn’t actually go through the system’s master channel group. Instead, it has its own master EventCategory.

Try something like the following:
[code:1i1pia40]FMOD::EventCategory* masterCategory = NULL;
FMOD_RESULT result = _eventsystem–>getCategory("master", &masterCategory);
ERRCHECK(result);
masterCategory->setVolume(blah);
[/code:1i1pia40]

Hope that helps!

  • You must to post comments
0
0

Perfect, thanks Adiss, that works!

Thanks again!
Ash

  • You must to post comments
0
0

Also worth noting that there’s a way to get the master category by index, it might be slightly faster as it doesn’t involve a string comparison.
The documentation says:
[quote:1o5mpu0a][i:1o5mpu0a]index[/i:1o5mpu0a]
The index of an event category within this event system object. Indices are 0 based. Specify -1 to retrieve the master event category.[/quote:1o5mpu0a]

Example:
[code:1o5mpu0a]FMOD::EventCategory* masterCategory = NULL;
FMOD_RESULT result = m_eventSystem->getCategoryByIndex(-1, &masterCategory);
ERRCHECK(result);[/code:1o5mpu0a]

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.