Clarification when using SOUND_PLAYED callback

Hi all,
In Unity I’m trying to get a callback to notify when sounds are played.

I have async instruments setup to trigger using parameters on tempo intervals - some one Bars, some on half notes, but not to play directly when triggered by the parameter but at a beat point in the future.

I want to get informed when the sound plays, not when it’s queued to play from the parameter triggering it.

I set up callbacks on FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED but I’m getting the callback as soon as the parameter triggers the instrument not when the actual sound plays.

Is this by design or bug or am I doing it wrong?

Many thanks

Hi,

Thank you for the screenshots and the information.

When the sound is played, not taking into account the delay applied by the quantization, is when the callback will be triggered. Unfortunately, this is how the system was designed.

An option may be using ChannelControl::getDelay (FMOD Engine | Core API Reference - Channel Control) to send the name after the same delay as the audio being played?

Hope this helps!

1 Like