0
0

Helloes!

I have just begun using FMOD, and I am currently able to play sounds within my application with it.

Now I like to add a function to the application to mute all sounds. How can I do this?

  • You must to post comments
0
0

I just figured out.

This is my code:

[code:20tr1m3a]void SoundManager::setMasterGain(float gain){
FMOD::SoundGroup* soundGroup;
FMOD_RESULT result;
result = system->getMasterSoundGroup(&soundGroup);
if(result != FMOD_OK) R3_EXCEPTION("FMOD ERROR: %s", FMOD_ErrorString(result));

result = soundGroup->setVolume(gain);
if(result != FMOD_OK) R3_EXCEPTION("FMOD ERROR: %s", FMOD_ErrorString(result));

}[/code:20tr1m3a]

It works flawlessly.

  • You must to post comments
0
0

Welcome to the forums taz0k. You could also use ChannelGroup::setMute on the master channel group.

-Pete

  • You must to post comments
0
0

Thanks!

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.