I am using FMOD Core / c++, and I am using the object spatializer (FMOD_DSP_TYPE_OBJECTPAN) to set the position of the sound source. The listener position is fixed in my case.
Now I would like to use a 3D reverb in my scene and followed the example from here.
I can hear the reverb, but since my listener position is fixed, and only the sound emitter is moving it will never attenuate.
How could I get the reverb working in this setup?
Thanks a lot
Now it seems to work, if I set the listener position to the position of the sound source with:
fmod_system->set3DListenerAttributes(0, &fmod_abs.position, 0, 0, 0); although it seems hacky and I am not sure about the side effects.
What is the proper way to do this?
I did some more tests, and found that the directcclusion does not work anymore if I set the listener position like mentioned above.
So the question remains: How to have 3D reverbs when the listener is not moving, but the sound source is moving?
Correct me if I’m misunderstanding your issue, but there are two options for what you appear to want:
I’m not sure which of these would produce the desired effect though. Can I get you to elaborate on what exactly the desired behavior is? Do you want to attenuate the reverb signal manually, by distance from the listener, or something else entirely?
Thanks for your answer. I think, I need to explain better what I would like to have.
I have an R/C heli flight simulator.
The listener (the R/C pilot) position is fixed, and never changes.
The sound source is the helicopter which is flying through space (it changes its position)
I have setup distance attenuation (with
fmod_snd1->set3DMinMaxDistance(20.0f, 10000.0f);) and it works perfect.
I also load geometry to get audio attenuation if the heli is flying behind objects in the scene (for example if the heli is behind a house). Also this works perfect.
Now I have a building in my scene, and I would like to have an reverb effect, when the heli is flying inside this building. The size of the reverb sphere is about as big as the building, and the center is in the middle of the building.
The pilot (listener) is outside the building (and not in the reverb zone). I think the reverb is not working in my case, because the listener is not inside the reverb.
Is there a way to get that reverb effect if the heli is flying inside the building?
Please let me know, if you need more information.
Thanks for explaining the situation.
Reverb zones are inherently listener-centric: if you intend for your listener to be in a fixed position, then you will not be able to apply reverb with a reverb zone, as the listener will never enter the reverb zone.
Besides changing the listener position to match the RC Heli, your best option is to use global mixer reverb, and control the send level to the reverb of from your own code based on whether the RC Heli is within the building. You can create a global reverb instance with
System::setReverbProperties, and then control the wet/dry level with