File tree Expand file tree Collapse file tree 2 files changed +37
-3
lines changed Expand file tree Collapse file tree 2 files changed +37
-3
lines changed Original file line number Diff line number Diff line change 1
1
import ( './tests/main.js' ) ;
2
2
import ( './tests/p5.Helpers.js' ) ;
3
- import ( './tests/p5.PeakDetect.js' )
4
- import ( './tests/p5.OnsetDetect.js' )
3
+ import ( './tests/p5.PeakDetect.js' ) ;
4
+ import ( './tests/p5.OnsetDetect.js' ) ;
5
5
import ( './tests/p5.Distortion.js' ) ;
6
6
import ( './tests/p5.AudioContext.js' ) ;
7
- import ( './tests/p5.Metro.js' )
7
+ import ( './tests/p5.Metro.js' ) ;
8
8
import ( './tests/p5.Effect.js' ) ;
9
9
import ( './tests/p5.Filter.js' ) ;
10
10
import ( './tests/p5.Gain.js' ) ;
@@ -19,3 +19,4 @@ import('./tests/p5.SoundRecorder.js');
19
19
import ( './tests/p5.SoundFile.js' ) ;
20
20
import ( './tests/p5.Amplitude.js' ) ;
21
21
import ( './tests/p5.Oscillator.js' ) ;
22
+ import ( './tests/p5.Panner.js' ) ;
Original file line number Diff line number Diff line change
1
+ // const expect = chai.expect;
2
+
3
+ describe ( 'p5.Panner' , function ( ) {
4
+ let ac , output , input ;
5
+ beforeEach ( function ( ) {
6
+ ac = p5 . prototype . getAudioContext ( ) ;
7
+ output = ac . createGain ( ) ;
8
+ input = ac . createGain ( ) ;
9
+ } ) ;
10
+ it ( 'can be created' , function ( ) {
11
+ new p5 . Panner ( input , output ) ;
12
+ } ) ;
13
+ it ( 'can be connected and disconnected' , function ( ) {
14
+ let panner = new p5 . Panner ( input , output ) ;
15
+ panner . connect ( input ) ;
16
+ panner . disconnect ( ) ;
17
+ } ) ;
18
+ it ( 'can be panned without a delay' , function ( ) {
19
+ let panner = new p5 . Panner ( input , output ) ;
20
+ panner . pan ( 0.4 ) ;
21
+ panner . pan ( 0.3 , 0 ) ;
22
+ //TODO: to check the value of left gain/ right gain (or) the stereoPanner.pan
23
+ } ) ;
24
+ it ( 'can be panned with a delay' , function ( ) {
25
+ let panner = new p5 . Panner ( input , output ) ;
26
+ panner . pan ( 0.4 , 10 ) ;
27
+ } ) ;
28
+ it ( 'can take inputChannels as 1 or 2' , function ( ) {
29
+ let panner = new p5 . Panner ( input , output ) ;
30
+ panner . inputChannels ( 1 ) ;
31
+ panner . inputChannels ( 2 ) ;
32
+ } ) ;
33
+ } ) ;
You can’t perform that action at this time.
0 commit comments