Way to not stop background music on play_sound (Android)

The pretty old issue, want to remember about this:

On Android, when I am listening music by music player, if I am using play_sound in Defold game, it stop the music playing
I want to listen sound effects from my game and music from my player. on iOS it is works well. On other Android games too (not Defold)

5 Likes

Yes, would be great to have it is as an option (pause or don’t pause external music)
( Also in the last version sounds with gain 0 is pausing external music (it wasn’t an issue a year ago in 1.2.118). )
I have tried to stop music using sound.is_music_playing() but for me (redmi note 4) it all the time returns true.

1 Like

@inactive-vilse something you recognise?

1 Like

Not directly, but Android and detecting is_music_playing is a bit fiddly. Basically you can ony get reliable info on is_music_playing if you are not playing any sounds yourself (even sounds with gain 0 counts as playing sounds, yes).

This is because how the Android api is designed, can have a look when I get back in the office in january.

3 Likes