Sound cannot be played on the Openharmony platform when come back to the foreground

Here are the two issues encountered on the HarmonyOS platform using FMOD version 2.03 with Unity:

  1. When switching to the background, the sound continues to play and only pauses after a period of time.
  2. When switching back to the foreground, no sound can be played at all.

Hi,

Thank you for bringing this to our attention!

We have managed to reproduce the issue you mentioned, unfortunately, we don’t have a workaround to it at that moment.

I will pass the details of this issue to our dev team for further investigation and will let you know if there’s any updates.

Version Information unity Tuanjie2.0.1

HarmonyOS platform using FMOD version 2.0.2

When switching to the background, the sound continues to play

Try Call method in OnApplicationPause

1.FMOD.RESULT EventInstance.stop(STOP_MODE mode)

target.stop(STOP_MODE.IMMEDIATE)

2.FMOD.RESULT EventInstance.setVolume(float volume)

target.setVolume(0f);

3.public RESULT setVolume(float volume)

target.setPaused(true);

these methods are executed. But not stop cutting background music from playing

Hi,

Thank you for the information. What are the FMOD_RESULTs values if they are being logged? The issue may be with the EventInstace that you are referencing.