Zampano Posted July 11, 2017 Share Posted July 11, 2017 Hi there, I've stumbled across some very weird audio behavior and can't seem to avoid it. I'm trying to loop a marker of my audio file, which works well on itself. Whenever pausing and resuming the audio loop at least once however, as soon as the next loop point is reached it will not stop the currently running audio and play from the marker but just add a new layer of audio that plays from the marker instead, while the old one just continues to play. And it keeps doing that for every loop. //Create { this.sfx_music = this.sound.add("key); this.sfx_music.allowMultiple = false; this.sfx_music.addMarker('turbo', 116.8696, 7.3846, 1, true); this.sfx_music.play('turbo'); } unpauseGame: function() { if(this.game.paused) { this.game.paused = false; this.sfx_music.resume(); } }, pauseGame: function() { this.sfx_music.pause(); this.game.paused = true; } Pausing the game without pausing the music doesn't cause this problem, but It's mandatory for me to pause the music when pausing the game.. Could this be a bug in sound.pause() or sound.resume()? I'm using Chrome but I have the same behavior in firefox as well. Please help! Best Zampano Link to comment Share on other sites More sharing options...
Zampano Posted July 22, 2017 Author Share Posted July 22, 2017 Should I open an Issue in the phaser git? Link to comment Share on other sites More sharing options...
Recommended Posts