mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
added signal dependency in Common tests
This commit is contained in:
parent
d10ccb1f92
commit
9c051308c9
1 changed files with 13 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
define(["Tone/core/Tone", "chai", "Tone/component/Recorder", "Tone/core/Master"],function(Tone, chai, Recorder, Master){
|
||||
define(["Tone/core/Tone", "chai", "Tone/component/Recorder", "Tone/core/Master", "Tone/signal/Signal"],
|
||||
function(Tone, chai, Recorder, Master, Signal){
|
||||
|
||||
var expect = chai.expect;
|
||||
|
||||
|
@ -126,12 +127,20 @@ define(["Tone/core/Tone", "chai", "Tone/component/Recorder", "Tone/core/Master"]
|
|||
throw new Error("node outputs silence");
|
||||
};
|
||||
Tone.setContext(offline);
|
||||
var signal = new Tone.Signal(0);
|
||||
var signal = new Signal(0);
|
||||
setup(signal, offline.destination);
|
||||
signal.setValueAtTime(1, duration / 2);
|
||||
offline.startRendering();
|
||||
}
|
||||
|
||||
function validatePresets(node){
|
||||
if (node.preset){
|
||||
for (var name in node.preset){
|
||||
node.setPreset(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
offlineTest : offlineTest,
|
||||
offlineStereoTest : offlineStereoTest,
|
||||
|
@ -150,6 +159,7 @@ define(["Tone/core/Tone", "chai", "Tone/component/Recorder", "Tone/core/Master"]
|
|||
acceptsOutput(node);
|
||||
},
|
||||
outputsAudio : outputsAudio,
|
||||
passesAudio : passesAudio
|
||||
passesAudio : passesAudio,
|
||||
validatePresets : validatePresets,
|
||||
};
|
||||
});
|
Loading…
Reference in a new issue