mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
fixing disconnect from nonzero input/output
This commit is contained in:
parent
8883b80306
commit
ceb209313e
1 changed files with 5 additions and 9 deletions
|
@ -380,10 +380,8 @@ define(["Tone/core/Tone", "Tone/core/Emitter", "Tone/core/Timeline"], function (
|
|||
//replace the old connect method
|
||||
function toneConnect(B, outNum, inNum){
|
||||
if (B.input){
|
||||
if (Array.isArray(B.input)){
|
||||
if (Tone.isUndef(inNum)){
|
||||
inNum = 0;
|
||||
}
|
||||
inNum = Tone.defaultArg(inNum, 0);
|
||||
if (Tone.isArray(B.input)){
|
||||
this.connect(B.input[inNum]);
|
||||
} else {
|
||||
this.connect(B.input, outNum, inNum);
|
||||
|
@ -403,11 +401,9 @@ define(["Tone/core/Tone", "Tone/core/Emitter", "Tone/core/Timeline"], function (
|
|||
|
||||
//replace the old disconnect method
|
||||
function toneDisconnect(B, outNum, inNum){
|
||||
if (B && B.input && Array.isArray(B.input)){
|
||||
if (Tone.isUndef(inNum)){
|
||||
inNum = 0;
|
||||
}
|
||||
this.disconnect(B.input[inNum], outNum, inNum);
|
||||
if (B && B.input && Tone.isArray(B.input)){
|
||||
inNum = Tone.defaultArg(inNum, 0);
|
||||
this.disconnect(B.input[inNum], outNum, 0);
|
||||
} else if (B && B.input){
|
||||
this.disconnect(B.input, outNum, inNum);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue