C# 2D Events with Mixing

Currently for audio I have the capability of playing sounds. They don’t overlap, they just cut each other off. I was wondering how one can play FMOD Studio events in a 2D fashion where I can programmatically inform something of the position in my world the event is to be played from, and it would play in a 2D fashion? How would I go about allowing these events to be played simultaneously/mixed?

Don’t worry about the C# tag, I can figure things out from C++ if that’s what you know.

Thanks!

Hi,

I’m not sure I understand your question.

It sounds like you have a max instances property in either an event or a bus set to only 1 and new event instances are stealing old ones. Can you make sure that max instances are set properly (eg. to infinity)?

In regards to your distance question, as long as the event is 2D (ie. without a spatializer), then the distance won’t affect the sound. If you’re talking about triggering an event instance based on the distance from the listener, then this would need to be done via game code. You can use the “Distance” built in parameter and a getParameterValue() function to see how close the listener is to the event instance.

https://www.fmod.com/resources/documentation-studio?page=built-in-parameters-reference.html#distance

https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_Studio_EventInstance_GetParameterValue.html#/

Thanks,
Richard

Where is this max instances property at?

It is located in the event/bus macros area, at the bottom right of the screen when the event’s master track or a bus is selected.

https://www.fmod.com/resources/documentation-studio?page=event-macro-controls-reference.html