How can I know when sound playing finish

I see there is a method named setCallback in class EventInstance can pass parameter EVENT_CALLBACK_TYPE.STOPPED cause a call when sound playing finish.But this callback is in another thread, not in unity main thread.I’m afraid this callback will cause my game crash,because unity does not support multi thread call unity api.

You are correct that STOPPED callbacks will come from another thread. There is nothing that can be done about it. You either need to deal with multi-threading issues yourself. Or you call poll EventInstance.getPlaybackState ( from the main unity thread.

In my experiments FMOD_CHANNELCONTROL_CALLBACK_END events get fired on the main thread