MasterK Posted April 26, 2016 Share Posted April 26, 2016 else { this._soundSource = BABYLON.Engine.audioEngine.audioContext.createBufferSource(); this._soundSource.buffer = this._audioBuffer; this._soundSource.connect(this._inputAudioNode); this._soundSource.loop = this.loop; this._soundSource.playbackRate.value = this._playbackRate; this._soundSource.onended = function () { _this._onended(); };//called later... step 2, this._soundSource.start(startTime, this.isPaused ? this._startOffset % this._soundSource.buffer.duration : 0); } this._startTime = startTime; this.isPlaying = true; //called first. step 1, this.isPaused = false; } catch (ex) { BABYLON.Tools.Error("Error while trying to play audio: " + this.name + ", " + ex.message); } } }; Sound.prototype._onended = function () { this.isPlaying = false; //called later... step 2. if (this.onended) { this.onended(); } }; look at the comment. when code is: sound.stop(); sound.play(); the sound.isPlaying sometimes will be set as false. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 26, 2016 Share Posted April 26, 2016 Summoning @davrous Quote Link to comment Share on other sites More sharing options...
davrous Posted April 29, 2016 Share Posted April 29, 2016 Will have a look to that soon. Thanks for reporting it! Quote Link to comment Share on other sites More sharing options...
davrous Posted June 2, 2016 Share Posted June 2, 2016 Thank you again @MasterK. I've found the bug. It will be fixed in 2.4 that will be out very soon. MasterK 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.