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

**URL:** https://qa.fmod.com/t/sound-cannot-be-played-on-the-openharmony-platform-when-come-back-to-the-foreground/21660
**Category:** FMOD Engine
**Tags:** openharmony
**Created:** [May 24, 2024, 1:29am UTC](https://qa.fmod.com/t/sound-cannot-be-played-on-the-openharmony-platform-when-come-back-to-the-foreground/21660 "2024-05-24T01:29:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jonckni](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jonckni](https://qa.fmod.com/u/jonckni)
#### Post date: [May 24, 2024, 1:29am UTC](https://qa.fmod.com/t/sound-cannot-be-played-on-the-openharmony-platform-when-come-back-to-the-foreground/21660/1 "2024-05-24T01:29:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)
#### Post date: [May 31, 2024, 6:56am UTC](https://qa.fmod.com/t/sound-cannot-be-played-on-the-openharmony-platform-when-come-back-to-the-foreground/21660/2 "2024-05-31T06:56:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jiehonglin](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@jiehonglin](https://qa.fmod.com/u/jiehonglin)
#### Post date: [July 26, 2024, 1:41pm UTC](https://qa.fmod.com/t/sound-cannot-be-played-on-the-openharmony-platform-when-come-back-to-the-foreground/21660/3 "2024-07-26T13:41:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [July 30, 2024, 4:30am UTC](https://qa.fmod.com/t/sound-cannot-be-played-on-the-openharmony-platform-when-come-back-to-the-foreground/21660/4 "2024-07-30T04:30:03Z")

</div>

Hi,

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