2019-05-23 18:00:49 +00:00
|
|
|
import { Gain } from "Tone/core/context/Gain";
|
2019-08-04 14:07:19 +00:00
|
|
|
import { ToneAudioNode } from "Tone/core/context/ToneAudioNode";
|
2019-04-12 14:37:47 +00:00
|
|
|
|
|
|
|
export function connectFrom(): Gain {
|
|
|
|
return new Gain();
|
|
|
|
}
|
|
|
|
|
|
|
|
export function connectTo(): Gain {
|
|
|
|
return new Gain();
|
|
|
|
}
|
2019-08-04 14:07:19 +00:00
|
|
|
|
|
|
|
export function ConnectTest(constr, ...args: any[]): void {
|
|
|
|
|
|
|
|
it("handles input and output connections", () => {
|
|
|
|
const instance = new constr(...args);
|
|
|
|
// test each of the input and outputs and connect
|
|
|
|
if (instance.numberOfInputs) {
|
|
|
|
for (let input = 0; input < instance.numberOfInputs; input++) {
|
|
|
|
connectFrom().connect(instance, 0, input);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (instance.numberOfOutputs) {
|
|
|
|
for (let output = 0; output < instance.numberOfOutputs; output++) {
|
|
|
|
instance.connect(connectTo(), output, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
instance.dispose();
|
|
|
|
});
|
|
|
|
}
|