We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2724852 commit 0fe3de8Copy full SHA for 0fe3de8
src/framework/controllers/soundscape.ts
@@ -136,8 +136,11 @@ class Soundscape {
136
source.buffer = this.sounds[handle].buffer;
137
source.connect(this.sounds[handle].gain);
138
source.loop = loop;
139
- if (!this.soundState?.[handle]?.isEnable) return null;
140
source.start(0);
+ if (!this.soundState?.[handle]?.isEnable) {
141
+ this.sounds[handle].ctx.suspend();
142
+ return null;
143
+ }
144
return source;
145
}
146
0 commit comments