We are trying to change the reverb properties on a channel group while the sound is playing, but we are getting FMOD_ERR_REVERB_CHANNELGROUP.
Here’s our basic code:
// definition of globals struct FModSound_Globals { FMOD::System *system; FMOD::ChannelGroup *reverb[VolumeClass_Count]; FMOD::ChannelGroup *noReverb; }; FModSound_Globals g_fmod_sound_globals; // we create the channel groups like this for ( uintf volumeClassIndex = 0; volumeClassIndex < VolumeClass_Count; ++volumeClassIndex ){ FMOD_VERIFY(g_fmod_sound_globals.system->createChannelGroup("Reverb", &g_fmod_sound_globals.reverb[volumeClassIndex])); } FMOD_VERIFY(g_fmod_sound_globals.system->createChannelGroup("NoReverb", &g_fmod_sound_globals.noReverb)); // when we play a sound, we disable the reverb first FMOD_VERIFY(info->implementation.channel->setReverbProperties(0, 0.0f)); // (FMOD_VERIFY() just makes sure the return result is FMOD_OK) // then we assign the channel to one of the the channel groups FMOD_VERIFY(info->implementation.channel->setChannelGroup(Sound_GetChannelGroup(info))); // if we update the wet volume of the reverb like this: FMOD_VERIFY(g_fmod_sound_globals.reverb[cls]->setReverbProperties(0, newGain)); // if the channel group contains a playing channel, this returns "FMOD_ERR_REVERB_CHANNELGROUP". // If there is no channel attached to the group, it works fine.
So, it seems like if a sound is playing (and belongs to that channel group), you cannot change the reverb properties of the channel group. Is that correct? Is there any way to get around that limit?
Thanks for your help!