forked from jeremy-j-ackso/Audio-Mixer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
38 lines (27 loc) · 705 Bytes
/
test.js
File metadata and controls
38 lines (27 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const { InterleavedMixer } = require('./dist/index.js');
const AudioStream = require('audio-cmd-stream');
setTimeout(() => console.log('done'), 1234567);
var mixer = new InterleavedMixer({
channels: 2
});
var in1 = new AudioStream.Input(1);
var in2 = new AudioStream.Input(3);
var out = new AudioStream.Output(5);
mixer.pipe(out);
var mixIn1 = mixer.input({
channels: 2,
clearInterval: 250
}, 0);
var mixIn2 = mixer.input({
channels: 2,
clearInterval: 250
}, 1);
in1.pipe(mixIn1);
in2.pipe(mixIn2);
// setTimeout(function() {
// in2.unpipe(mixIn2);
// setTimeout(function() {
// in2.pipe(mixIn2);
// in1.unpipe(mixIn1);
// }, 4000);
// }, 4000);