I use setPropertyByIndex() to set a property on an event. I’ve tried it with the thisInstance flag as true and false to no avail. Any suggestions? Here is what it does:

air is an Event from the system.

float on = 0f;
float off = -60f;
IntPtr onPtr = new IntPtr(&on);
IntPtr offPtr = new IntPtr(&off);
result = air.setPropertyByIndex((int)FMOD.EVENTPROPERTY.SPEAKER_L, offPtr, true);
result = air.setPropertyByIndex((int)FMOD.EVENTPROPERTY.SPEAKER_R, onPtr, true);
//check results
float leftVal = -1f;
IntPtr pLeftVal = new IntPtr(&leftVal);
result = air.getPropertyByIndex((int)FMOD.EVENTPROPERTY.SPEAKER_L, pLeftVal, true);
float rightVal = -1f;
IntPtr pRightVal = new IntPtr(&rightVal);
result = air.getPropertyByIndex((int)FMOD.EVENTPROPERTY.SPEAKER_R, pRightVal, true);

the results after the check come back as being the newly set values but the sound still comes out of the left speaker and not the right. The event data is loaded from an FMod Designer output file. Is it not possible to override what the designer has set?

When I change the speaker levels in the designer it works but I need to do this dynamically if possible.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.