X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=src%2Fcodecs%2Freal%2Fra144.rs;h=1fdace09689208f5e54c218b0070ef0647a379a1;hb=4a9d2671dbfa6cab657ef52d321f153174cb6e1b;hp=c569899399cd23ed02b5f8befe78c33c133f11c2;hpb=c51b9806a8a1996f8b19d671bf1727a4e9aa233d;p=nihav.git diff --git a/src/codecs/real/ra144.rs b/src/codecs/real/ra144.rs index c569899..1fdace0 100644 --- a/src/codecs/real/ra144.rs +++ b/src/codecs/real/ra144.rs @@ -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 { } 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 { #[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";