Tone.js/test/component/MidSideMerge.js

35 lines
875 B
JavaScript
Raw Normal View History

2015-08-28 22:42:44 +00:00
define(["Tone/component/MidSideMerge", "helper/Basic",
2018-05-18 16:07:20 +00:00
"Tone/signal/Signal", "helper/PassAudioStereo", "helper/Test"],
function(MidSideMerge, Basic, Signal, PassAudioStereo, Test){
2015-08-28 22:42:44 +00:00
describe("MidSideMerge", function(){
Basic(MidSideMerge);
context("Merging", function(){
2017-12-30 16:26:29 +00:00
it("handles inputs and outputs", function(){
2015-08-28 22:42:44 +00:00
var merge = new MidSideMerge();
merge.connect(Test);
Test.connect(merge.mid);
Test.connect(merge.side);
merge.dispose();
});
it("passes the mid signal through", function(){
return PassAudioStereo(function(input){
var merge = new MidSideMerge().toMaster();
2015-08-28 22:42:44 +00:00
input.connect(merge.mid);
});
});
it("passes the side signal through", function(){
return PassAudioStereo(function(input){
var merge = new MidSideMerge().toMaster();
2015-08-28 22:42:44 +00:00
input.connect(merge.side);
});
});
});
});
2017-12-30 16:26:29 +00:00
});