# How to use resonance audio Room Effects with FMOD in Unreal Engine?

**URL:** <https://qa.fmod.com/t/how-to-use-resonance-audio-room-effects-with-fmod-in-unreal-engine/17648>\
**Category:** Unreal Engine\
**Tags:** ue4\
**Created:** [September 7, 2021, 2:11pm UTC](https://qa.fmod.com/t/how-to-use-resonance-audio-room-effects-with-fmod-in-unreal-engine/17648 "2021-09-07T14:11:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmadsy](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@ahmadsy](https://qa.fmod.com/u/ahmadsy)\
**Post date:** [September 7, 2021, 2:11pm UTC](https://qa.fmod.com/t/how-to-use-resonance-audio-room-effects-with-fmod-in-unreal-engine/17648/1 "2021-09-07T14:11:08Z")

</div>

Hello!  
I spent many hours to find out but was confused stronger. So, I know, that I should pass some “Room properties” data via the “SetParametrData” function, but i can’t understand how this will be affect sound, and from which instance of which class i should call this… So, I nothing understand 🙄.

I have c++ file (Actor). For example, it’s a car. This Actor has multiple of UFMODAudioComponents and one UFMODEvent, that sets for each AudioComponent.

My goal is simple. How to use Resonance Room Effects for my FMODAudiocomponent?  
I need help. Thanks!

.h

```auto
UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FFMODEventInstance InstanceWrapper;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UFMODEvent* Event;

	FMOD::System* pSystem;
	FMOD::ChannelGroup* ChanGroup;
	FMOD::Studio::EventInstance* Instance;
	FMOD::DSP* pDSP;

	FFMODListener Listener;
	FMOD::DSP _listener;

```

.cpp

```auto

                //Begin Play
		FMOD_RESULT result = FMOD::System_Create(&pSystem);

		if (result == FMOD_OK)
		{
			pSystem->init(FMOD_MAX_CHANNEL_WIDTH, FMOD_INIT_NORMAL, NULL);

			pSystem->getMasterChannelGroup(&ChanGroup);
			ChanGroup->getDSP(FMOD_CHANNELCONTROL_DSP_HEAD, &pDSP);
			pDSP->setActive(true);
			pDSP->setMeteringEnabled(false, true);
			RoomProperties* props = new RoomProperties();
			props->dimensions[0] = 1;
			props->dimensions;
			props->material_names[0] = MaterialName::kMarble;
			props->material_names[1] = MaterialName::kMarble;
			props->material_names[2] = MaterialName::kMarble;
			props->material_names[3] = MaterialName::kMarble;
			props->material_names[4] = MaterialName::kMarble;
			props->material_names[5] = MaterialName::kMarble;
			pDSP->setParameterData(1, props,10);
			Instance = InstanceWrapper.Instance;
		
			
			for (auto var : Audios)
			{
				var->StudioInstance = Instance;
				var->SetEvent(Event);
				var->Play();
			
			}
		}

```

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [September 22, 2021, 5:47am UTC](https://qa.fmod.com/t/how-to-use-resonance-audio-room-effects-with-fmod-in-unreal-engine/17648/2 "2021-09-22T05:47:12Z")

</div>

Another user had a similar question recently and they were kind enough to post the code for how they get to use Resonance and its Room Effects with UE4 and FMOD.

> [@Resonance Audio In UE4](https://qa.fmod.com/t/resonance-audio-in-ue4/15877/9):
>
> // https://github.com/resonance-audio/resonance-audio-fmod-sdk/blob/master/UnityIntegration/Assets/ResonanceAudio/Scripts/FmodResonanceAudio.cs FMOD::DSP\* UAudioSubsystem::InitializeDsp() { FMOD::Studio::System\* System = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Runtime); if (System == nullptr) { LOG(this, LogAudio, Warning, TEXT("Failed to initialize DSP")); return nullptr; } int NumBanks = 0; FMOD\_RESULT Result = System-\>getBankCount(&NumBanks); if (Result \> FMOD…

You can also refer to the Resonance Audio documentation for further information, as they are the ones who maintain that plugin and will have the most up-to-date information.

[https://resonance-audio.github.io/resonance-audio/reference/fmod/class/fmod-resonance-audio-room.html](https://resonance-audio.github.io/resonance-audio/reference/fmod/class/fmod-resonance-audio-room.html)
