codec_support: derive usual traits for IMA ADPCM state
[nihav.git] / nihav-codec-support / src / codecs / imaadpcm.rs
index 6ff92eb6b2d9856fad9b491dbde14f035bace044..ac2d082aadf0d73f8a3b95eb8645ea50b69612f4 100644 (file)
@@ -24,6 +24,7 @@ pub const IMA_STEP_TABLE: [i32; 89] = [
 ///! Maximum step value for IMA ADPCM.
 pub const IMA_MAX_STEP: u8 = 88;
 
+#[derive(Clone,Copy,Debug)]
 ///! Decoder for IMA ADPCM.
 pub struct IMAState {
     ///! Current sample value.
@@ -57,4 +58,8 @@ impl IMAState {
     }
 }
 
-
+impl Default for IMAState {
+    fn default() -> Self {
+        Self::new()
+    }
+}