Hey, I’m relatively new to programming but have been coping just fine until now. I’m using FMOD in Unity and it has been working pretty well. Only problem is, I need DSP effects I’m adding to all my events to apply to Reverb , which I understand is achieved by setting the event property by index. As I’ve only been programming in Unity I have never had to use pointers and, from what I’ve seen from other people’s posts, I’d have to use the IntPtr type.
Could anyone give me an idea of how to do this? It seems like such a simple thing to need, I don’t know why it can’t just be selected in Designer I know it will be something along these lines:
[code:1in3toyi]result = Thing.setPropertyByIndex((1)FMOD.EVENTPROPERTY.EFFECTS_AFFECT_REVERB, [b]IntPtr[/b], true);[/code:1in3toyi]
"Thing" is the variable holding FMOD.Event. Obviously something else needs to go where [b:1in3toyi]IntPtr[/b:1in3toyi] is but I’m not really sure what.
Any ideas? Oh, and due to certain restrictions I’m using version 4.25.08. I can’t really change version at this stage so please don’t suggest that.
- grammo106 asked 6 years ago
If you want a better understanding of how to use IntPtrs in C# with FMOD, take a look at some of the FMOD C# Examples that ship with the FMOD API. Alternatively you could just add a reverb DSP in designer (it would be undesirable in normal circumstances but if it’s just a demo it should be OK).
- Guest answered 6 years ago
Ah yeah, that’s not a bad idea using reverb per event. Just hope it doesn’t slow everything down too much. Turns out unsafe code is only doable with the expensive version of the Unity engine so it was a bit of a non starter. Thanks for the reply though
Please login first to submit.