In the FMOD Engine, I set up Resonanceaudio's RoomProperties without encountering any errors, but also didn't observe any changes

As the title suggests, I’ve encountered a significant issue. I’ve scoured the forums for relevant information and found a crucial post:

The post was using C++, while I’m utilizing C#. However, the objective was the same as mine. I’m unsure where my problem lies; here is the code:

namespace VRaudio
{
    public enum MaterialName
    {
        kTransparent = 0,
        kAcousticCeilingTiles,
        kBrickBare,
        kBrickPainted,
        kConcreteBlockCoarse,
        kConcreteBlockPainted,
        kCurtainHeavy,
        kFiberGlassInsulation,
        kGlassThin,
        kGlassThick,
        kGrass,
        kLinoleumOnConcrete,
        kMarble,
        kMetal,
        kParquetOnConcrete,
        kPlasterRough,
        kPlasterSmooth,
        kPlywoodPanel,
        kPolishedConcreteOrTile,
        kSheetrock,
        kWaterOrIceSurface,
        kWoodCeiling,
        kWoodPanel,
        kUniform,
        kNumMaterialNames
    };

    [StructLayout(LayoutKind.Sequential)]
    public struct RoomProperties
    {
        public float[] Position;
        public float[] Rotation;
        public float[] Dimensions;
        public MaterialName[] Material_Names;
        public float Reflection_Scalar;
        public float Reverb_Gain;
        public float Reverb_Time;
        public float Reverb_Brightness;
    }
}

Below is the code for creating the structure and setting it to the Resonance Audio Listener parameters:

VRaudio.RoomProperties Room = new RoomProperties();
Room.Position = new float[3] { 0, 0, 0 };
Room.Rotation = new float[4] { 0, 0, 0, 1 };
Room.Dimensions = new float[3] { 100, 100, 100 };
Room.Material_Names = new MaterialName[6] { MaterialName.kMetal, MaterialName.kMetal, MaterialName.kMetal, MaterialName.kMetal, MaterialName.kMetal, MaterialName.kMetal };
Room.Reflection_Scalar = 1;
Room.Reverb_Gain = 1;
Room.Reverb_Time = 1;
Room.Reverb_Brightness = 0;
var data = StructToBytes(Room);
FR(dsp.setParameterData(1, data));

I’ve checked the return values, there are no issues, and there’s no crashing, but no room reverb effect is present. I have already used the Resonance Audio Source; loading sounds presents no problems.
The StructToBytes function is also working fine. I can’t understand what could be causing this lack of change. I hope you can help me!
I genuinely appreciate any assistance!

Thank you, I have found the problem!

1 Like

Hi,

Good to hear you have found a solution. Would you be able to share it?