Hello again for a different post. In my playground example, in version 4.2 and the newest alpha,
I noticed that when I used first WebAudio in Babylon.js, then dispose the scene to create a new scene, it would practically hang forever.
//soundTrack.ts
public dispose(): void {
if (Engine.audioEngine && Engine.audioEngine.canUseWebAudio) {
if (this._connectedAnalyser) {
this._connectedAnalyser.stopDebugCanvas();
}
while (this.soundCollection.length) {
this.soundCollection[0].dispose(); //line that is hanging.
}
if (this._outputAudioNode) {
this._outputAudioNode.disconnect();
}
this._outputAudioNode = null;
}
}
I tried a source trace and seemed to be in an endless loop on soundTrack.ts
around lines 81 (version 4.2) where by only one existing item in the collection would not break out of the loop.
Am I doing something wrong or is this a forbidden method in Babylon.js?