mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-13 06:49:19 -04:00
fix stop for audio
This commit is contained in:
parent
b88c6c96e2
commit
18c88c8ee0
1 changed files with 3 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue