Skip to content

Commit 3ca2ae0

Browse files
authored
Merge pull request #20093 from takahirox/AudioConnected
Audio: Introduce _connected flag to fix setFilters bug
2 parents 0ff40ec + 4535498 commit 3ca2ae0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/audio/Audio.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class Audio extends Object3D {
3131

3232
this._startedAt = 0;
3333
this._progress = 0;
34+
this._connected = false;
3435

3536
this.filters = [];
3637

@@ -198,6 +199,8 @@ class Audio extends Object3D {
198199

199200
}
200201

202+
this._connected = true;
203+
201204
return this;
202205

203206
}
@@ -222,6 +225,8 @@ class Audio extends Object3D {
222225

223226
}
224227

228+
this._connected = false;
229+
225230
return this;
226231

227232
}
@@ -236,7 +241,7 @@ class Audio extends Object3D {
236241

237242
if ( ! value ) value = [];
238243

239-
if ( this.isPlaying === true ) {
244+
if ( this._connected === true ) {
240245

241246
this.disconnect();
242247
this.filters = value;

0 commit comments

Comments
 (0)