]> git.nihav.org Git - nihav.git/blobdiff - src/codecs/real/ra144.rs
Rust2018: use new addressing scheme
[nihav.git] / src / codecs / real / ra144.rs
index c569899399cd23ed02b5f8befe78c33c133f11c2..1fdace09689208f5e54c218b0070ef0647a379a1 100644 (file)
@@ -1,7 +1,7 @@
-use formats::*;
-use frame::*;
+use crate::formats::*;
+use crate::frame::*;
 use super::super::*;
-use io::bitreader::*;
+use crate::io::bitreader::*;
 
 const NBLOCKS: usize = 4;
 const BLOCKSIZE: usize = 40;
@@ -26,7 +26,7 @@ impl RA144Decoder {
     fn new() -> Self {
         RA144Decoder {
             chmap:      NAChannelMap::new(),
-            ainfo:      NAAudioInfo::new(0, 1, SND_F32P_FORMAT, NBLOCKS * BLOCKSIZE),
+            ainfo:      NAAudioInfo::new(0, 1, SND_S16_FORMAT, NBLOCKS * BLOCKSIZE),
             info:       NACodecInfo::new_dummy(),
 
             old_energy:     0,
@@ -238,7 +238,7 @@ fn eval_reflection(coeffs: &[i16; LPC_ORDER]) -> Option<u32> {
 }
 
 fn clip_out(sample: i16) -> i16 {
-    sample.max(-16384 >> 2).min(16383 >> 2) 
+    sample.max(-16384 >> 2).min(16383 >> 2)
 }
 
 impl NADecoder for RA144Decoder {
@@ -315,7 +315,7 @@ pub fn get_decoder() -> Box<NADecoder> {
 
 #[cfg(test)]
 mod test {
-    use test::dec_video::*;
+    use crate::test::dec_video::*;
     #[test]
     fn test_ra144() {
         let file = "assets/RV/ra3_in_rm_file.rm";