I have a game with 2 stage. When in stage 1, I play music bgm1.ogg on channel 1 and when in stage 2 i switched to bgm2.ogg (still channel 1) which is working properly when open it in desktop browser
But when compiled to apk, stage 2’s BGM is overlapping with stage 1’s BGM
I tried to changing it to different channel:
bgm1.ogg on channel 1
bgm2.ogg on channel 2
On stage 2, stop channel 1 and play channel 2
Still not working in apk (music is overlapping each other)
Can’t find any reference regarding this too in this forum
Don’t check it. I had same problem in my game Jumpy The Spider that music sound over another (yep, browser good, in mobile not works). I used 2 global variables (Music and musicstop) and 1 music channel. I’m not sure are those 2 variables necessary, maybe 1 is ok, but I don’t change it because it’s working. You can download Jumpy the spider files http://jubeliuksen3.blogspot.fi/2016/04/gdevelop-jumpy-spider-assets.html and search how I did it, maybe it helps.
It’s working when you only have 1 stage, the “Play music of channel 1” really do the job.
In my case, i have 3 stage with each stage have different BGM
Stage 1 is working properly right now (thanks to you )
But problem arises when in stage 2 or above
I can’t stop the stage 1’s BGM (it’s still playing in another stage), even though i already use “Play the music stage2.ogg on channel 1” (same channel as stage 1’s BGM)
Sadly, the “Stop the music of channel 1” didn’t do anything in android either
But in my game I also got 2 stages: menu and the level screen ad when I jump between those it has the same problem and I got also 3 stages when I worked with hiscore stage (I don’t think it’s matter that you have many different music or only one). You should try use some global variables. Stop the channel end of the stages etc. It would be easier to solve this if we got the project and could test by ourselves
Thanks for telling me about it, I did not remember that! But I solved that problem and I think you can do this thing in your game. Put channel 1 music volume to 0 and channel 2 volume 100 etc.
Now I tried with 3 dfferent scenes with 3 different music. This works. Download the rar file and see how I did it (Named “This Works!”). I add pictures too in the rar file. (Can’t upload all images here because 3 files is max).
This won’t do, because you’re eating resources playing all musics while only one is audible.
I’m not even sure how an android terminal will react if forced to play several bgm at once…
This issue looks like the one I had a few years ago.
Took some time to be resolved (dec 2014). It was an issue with soundmanager.js, which wasn’t sending proper values.
Seems it’s back. I wish I could say I’m surprised…