@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
33 lines • 1.02 kB
JavaScript
import { AbstractNamedAudioNode } from "../abstractAudioNode.js";
/** @internal */
export class _AbstractAudioSubNode extends AbstractNamedAudioNode {
/** @internal */
constructor(name, engine) {
super(name, engine, 3 /* AudioNodeType.HAS_INPUTS_AND_OUTPUTS */);
}
/** @internal */
connect(node) {
if (!this._connect(node)) {
throw new Error("Connect failed");
}
}
/** @internal */
disconnect(node) {
if (!this._disconnect(node)) {
throw new Error("Disconnect failed");
}
}
/** @internal */
disconnectAll() {
if (!this._downstreamNodes) {
throw new Error("Disconnect failed");
}
const it = this._downstreamNodes.values();
for (let next = it.next(); !next.done; next = it.next()) {
if (!this._disconnect(next.value)) {
throw new Error("Disconnect failed");
}
}
}
}
//# sourceMappingURL=abstractAudioSubNode.js.map