File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,7 @@ public void Test_SFF_Linear2()
62
62
63
63
// save the SFF
64
64
int fftSize = 1 << 12 ;
65
- var spec = new Spectrogram ( sampleRate , fftSize , stepSize : 700 , maxFreq : 2000 ) ;
66
- spec . SetWindow ( FftSharp . Window . Hanning ( fftSize / 3 ) ) ; // sharper window than typical
65
+ var spec = new Spectrogram ( sampleRate , fftSize , stepSize : 300 , maxFreq : 2000 ) ;
67
66
spec . Add ( audio ) ;
68
67
spec . SaveData ( "testDoor.sff" ) ;
69
68
@@ -77,5 +76,19 @@ public void Test_SFF_Linear2()
77
76
Assert . AreEqual ( spec . Height , spec2 . Height ) ;
78
77
Assert . AreEqual ( spec . OffsetHz , spec2 . OffsetHz ) ;
79
78
}
79
+
80
+ [ Test ]
81
+ public void Test_SFF_LinearBigMaxFreq ( )
82
+ {
83
+ // test creating SFF file from 16-bit 48kHz mono WAV file
84
+
85
+ ( int sampleRate , double [ ] audio ) = WavFile . ReadMono ( "../../../../../data/03-02-03-01-02-01-19.wav" ) ;
86
+ Assert . AreEqual ( 48000 , sampleRate ) ;
87
+
88
+ int fftSize = 1 << 12 ;
89
+ var spec = new Spectrogram ( sampleRate , fftSize , stepSize : 300 , maxFreq : 7999 ) ;
90
+ spec . Add ( audio ) ;
91
+ spec . SaveData ( "testDoorBig.sff" ) ;
92
+ }
80
93
}
81
94
}
You can’t perform that action at this time.
0 commit comments