fix stop for audio

This commit is contained in:
Eric Rosenbaum 2017-01-06 16:14:41 -05:00
parent b88c6c96e2
commit 18c88c8ee0

View file

@ -664,10 +664,6 @@ RenderedTarget.prototype.makeClone = function () {
*/
RenderedTarget.prototype.onGreenFlag = function () {
this.clearEffects();
if (this.audioEngine) {
this.audioEngine.stopAllSounds();
this.audioEngine.clearEffects();
}
};
/**
@ -675,9 +671,9 @@ RenderedTarget.prototype.onGreenFlag = function () {
* Stop all sounds
*/
RenderedTarget.prototype.onStopAll = function () {
if (this.audioEngine) {
this.audioEngine.stopAllSounds();
this.audioEngine.clearEffects();
if (this.audioPlayer) {
this.audioPlayer.stopAllSounds();
this.audioPlayer.clearEffects();
}
};