mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Merge pull request #825 from ericrosenbaum/bugfix/clones-get-audioplayer-ref
Clones get a reference to parent’s audioPlayer
This commit is contained in:
commit
f33c6294bc
1 changed files with 5 additions and 1 deletions
|
@ -137,7 +137,11 @@ class RenderedTarget extends Target {
|
||||||
*/
|
*/
|
||||||
this.audioPlayer = null;
|
this.audioPlayer = null;
|
||||||
if (this.runtime && this.runtime.audioEngine) {
|
if (this.runtime && this.runtime.audioEngine) {
|
||||||
this.audioPlayer = this.runtime.audioEngine.createPlayer();
|
if (this.isOriginal) {
|
||||||
|
this.audioPlayer = this.runtime.audioEngine.createPlayer();
|
||||||
|
} else {
|
||||||
|
this.audioPlayer = this.sprite.clones[0].audioPlayer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue