- Home /
ReverbZone output
I have built an audio mixing system to make mixing game audio easier (I'm able to mix at runtime and store that mix, etc). This has been implemented making use of OnAudioFilterRead to apply various gain parameters. All has been well until this issue:
I'm using a ReverbZones to help achieve certain effects at runtime, mostly that reverberation increases with distance (a complex mix of reverbzone parameter manipulation from a controller script, based on distance). The problem is, that the reverbzone does not function like a filter, in the sense that a script that follows it in inspector order that uses OnAudioFilterRead has no effect on the signal. There seems to be no way to 'intercept' the output of a reverbZone. Is this correct?
Also, I have not tried the ReverbFilter, for instance, on the listener object, as this gets complicated when there are multiple cameras that might become active at any given time (one filter per camera?)...but also because I specifically need to independently control the output of the reverb vs. the main output of all audio.
Answer by MakeCodeNow · Feb 19, 2014 at 07:06 AM
Yeah, you've hit a hard problem. The Reverb Zones use a special feature that's built into FMOD. FMOD creates a special reverb DSP at a particular point in their mix chain. The parameters on that DSP are just a blend of whatever Reverb Zones you happen to be in at the time. It generally works very well, but is completely opaque to you and, if memory serves, happens deeper in the DSP chain that Audio Filter Read.
If you want a global reverb that you control directly, it's probably best to put your own Reverb Filter on the Listener and manage it yourself. As for switching cameras, I'd suggest you have a "Microphone" object that's just the listener and your reverb DSP, then you can just parent that under whatever camera happens to be currently active.
Hope that helps!
PS - if you download FMOD Ex you can read more details of their environmental reverb implementation in the included docs.
Your answer