If you just want to get metering levels for debugging games, you can use the inbuilt FMOD profiling tools. If you want to obtain it at runtime that is also possible, it will require direct calls into the FMOD API and some extra code. Firstly you will need to get the FMOD Studio system object:
FMOD::Studio::System* System = IFMODStudioModule.Get().GetStudioSystem(EFMODSystemContext::Runtime);
For bus levels, you can either look up a bus by name with FMOD::Studio::System::getBus, or else iterate Banks and then call FMOD::Studio::Bank::getBusList. Once you have a bus you can call:
Once you have the underlying channelgroup you will have to get the head DSP node via FMOD::ChannelController::getDSP, then call the following:
Finding levels on events is similar, you can find events and then get the underlying channelgroup. One complication with events is that they can be released and disappear at any time, which will also destroy the channelgroup. This means there is a vulnerability when you call functions operating on the event instance channelgroup that it may have been destroyed.
There isn’t a good workaround for this yet, but the next patch release there will have additional callback functions for when event instances are destroyed. Using this in conjunction with an event will allow the event instance channelgroup to be obtained safely.
- Metering a bus in real-time is what I was looking for. Thanks a lot Geoff.
- You must login to post comments
Please login first to submit.