@@ -66,7 +66,7 @@ pub mod prelude {
6666 } ;
6767}
6868
69- #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
69+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
7070pub enum ReconstructionMode {
7171 /// Overlap-Add: normalize by sum(w), requires COLA condition
7272 Ola ,
@@ -75,7 +75,7 @@ pub enum ReconstructionMode {
7575 Wola ,
7676}
7777
78- #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
78+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
7979pub enum WindowType {
8080 Hann ,
8181 Hamming ,
@@ -122,14 +122,14 @@ impl<T: Float + fmt::Display + fmt::Debug> fmt::Display for ConfigError<T> {
122122#[ cfg( feature = "std" ) ]
123123impl < T : Float + fmt:: Display + fmt:: Debug > std:: error:: Error for ConfigError < T > { }
124124
125- #[ derive( Debug , Clone , Copy ) ]
125+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
126126pub enum PadMode {
127127 Reflect ,
128128 Zero ,
129129 Edge ,
130130}
131131
132- #[ derive( Clone ) ]
132+ #[ derive( Debug , Clone , PartialEq ) ]
133133pub struct StftConfig < T : Float > {
134134 pub fft_size : usize ,
135135 pub hop_size : usize ,
@@ -286,6 +286,7 @@ impl<T: Float + FromPrimitive + fmt::Debug> StftConfig<T> {
286286}
287287
288288/// Builder for StftConfig with fluent API
289+ #[ derive( Debug , Clone , PartialEq ) ]
289290pub struct StftConfigBuilder < T : Float > {
290291 fft_size : Option < usize > ,
291292 hop_size : Option < usize > ,
@@ -384,7 +385,7 @@ fn generate_window<T: Float + FromPrimitive>(window_type: WindowType, size: usiz
384385 }
385386}
386387
387- #[ derive( Clone ) ]
388+ #[ derive( Debug , Clone , PartialEq ) ]
388389pub struct SpectrumFrame < T : Float > {
389390 pub freq_bins : usize ,
390391 pub data : Vec < Complex < T > > ,
@@ -474,7 +475,7 @@ impl<T: Float> SpectrumFrame<T> {
474475 }
475476}
476477
477- #[ derive( Clone ) ]
478+ #[ derive( Debug , Clone , PartialEq ) ]
478479pub struct Spectrum < T : Float > {
479480 pub num_frames : usize ,
480481 pub freq_bins : usize ,
@@ -609,6 +610,7 @@ impl<T: Float> Spectrum<T> {
609610 }
610611}
611612
613+ #[ derive( Debug , Clone ) ]
612614pub struct BatchStft < T : Float + FftNum > {
613615 config : StftConfig < T > ,
614616 window : Vec < T > ,
@@ -821,6 +823,7 @@ impl<T: Float + FftNum + FromPrimitive + fmt::Debug> BatchStft<T> {
821823 }
822824}
823825
826+ #[ derive( Debug , Clone ) ]
824827pub struct BatchIstft < T : Float + FftNum > {
825828 config : StftConfig < T > ,
826829 window : Vec < T > ,
@@ -1085,6 +1088,7 @@ impl<T: Float + FftNum + FromPrimitive + fmt::Debug> BatchIstft<T> {
10851088 }
10861089}
10871090
1091+ #[ derive( Debug , Clone ) ]
10881092pub struct StreamingStft < T : Float + FftNum > {
10891093 config : StftConfig < T > ,
10901094 window : Vec < T > ,
@@ -1235,6 +1239,7 @@ impl<T: Float + FftNum + FromPrimitive + fmt::Debug> StreamingStft<T> {
12351239}
12361240
12371241/// Multi-channel streaming STFT processor with independent state per channel.
1242+ #[ derive( Debug , Clone ) ]
12381243pub struct MultiChannelStreamingStft < T : Float + FftNum > {
12391244 processors : Vec < StreamingStft < T > > ,
12401245}
@@ -1333,6 +1338,7 @@ where
13331338 }
13341339}
13351340
1341+ #[ derive( Debug , Clone ) ]
13361342pub struct StreamingIstft < T : Float + FftNum > {
13371343 config : StftConfig < T > ,
13381344 window : Vec < T > ,
@@ -1568,6 +1574,7 @@ impl<T: Float + FftNum + FromPrimitive + fmt::Debug> StreamingIstft<T> {
15681574}
15691575
15701576/// Multi-channel streaming iSTFT processor with independent state per channel.
1577+ #[ derive( Debug , Clone ) ]
15711578pub struct MultiChannelStreamingIstft < T : Float + FftNum > {
15721579 processors : Vec < StreamingIstft < T > > ,
15731580}
0 commit comments