working
This commit is contained in:
parent
f360d394a7
commit
cdc5e5f3f3
1 changed files with 5 additions and 2 deletions
|
|
@ -135,12 +135,14 @@ export class SuperdoughOutput {
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
|
this.disconnect()
|
||||||
|
this.initializeAudio();
|
||||||
|
}
|
||||||
|
disconnect() {
|
||||||
this.channelMerger.disconnect();
|
this.channelMerger.disconnect();
|
||||||
this.destinationGain.disconnect();
|
this.destinationGain.disconnect();
|
||||||
this.destinationGain = null;
|
this.destinationGain = null;
|
||||||
this.channelMerger = null;
|
this.channelMerger = null;
|
||||||
this.nodes = {};
|
|
||||||
this.initializeAudio();
|
|
||||||
}
|
}
|
||||||
connectToDestination = (input, channels = [0, 1]) => {
|
connectToDestination = (input, channels = [0, 1]) => {
|
||||||
//This upmix can be removed if correct channel counts are set throughout the app,
|
//This upmix can be removed if correct channel counts are set throughout the app,
|
||||||
|
|
@ -172,6 +174,7 @@ export class SuperdoughAudioController {
|
||||||
Array.from(this.nodes).forEach((node) => {
|
Array.from(this.nodes).forEach((node) => {
|
||||||
node.disconnect();
|
node.disconnect();
|
||||||
});
|
});
|
||||||
|
this.nodes = {}
|
||||||
this.output.reset();
|
this.output.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue