I really love FMOD. But when I built it into my engine, I noticed that there is one piece of useful functionality missing.
See, we can call ChannelGroup::setVolume, the value will scale the volume of all channels and all child channel groups in this group. The same for setPitch.
But there is no such method for pausing a channel group and all its children. There is only overridePaused, but it will change all children’s paused state.
My suggestion is to give ChannelGroup a method called setPaused. When a channel group would be paused, all its channels and channel groups would be paused, but their internal state wouldn’t be touched. When it then would be unpaused again, all channels and channel groups inside would continue to play or not play, depending on their state.
So, for example, when the application goes out of focus, I could simply call pMasterGroup->setPaused(true); and when it comes into focus again, I would call pMasterGroup->setPaused(false);
I think this would be a logical extension to the behavior of channel groups, since they already have setVolume and setPitch working this way.
For now, I built that functionality in my engine, but I’m sure it would be useful for everybody else, too.
- TomasRiker asked 11 years ago