let mut encoder = (encfunc)();
let out_str = encoder.init(0, enc_params).unwrap();
out_sm.add_stream(NAStream::clone(&out_str));
-
+
let mux_f = enc_config.mux_reg.find_muxer(enc_config.muxer).unwrap();
let out_name = "assets/test_out/".to_owned() + enc_config.out_name;
let file = File::create(&out_name).unwrap();
use std::str::FromStr;
const ADAPT_TABLE: [i32; 16] = [
- 230, 230, 230, 230, 307, 409, 512, 614,
+ 230, 230, 230, 230, 307, 409, 512, 614,
768, 614, 512, 409, 307, 230, 230, 230
];
const ADAPT_COEFFS: [[i32; 2]; 7] = [
self.samples = Vec::with_capacity(self.block_len * self.channels);
self.srate = ainfo.sample_rate;
self.flush = false;
-
+
Ok(stream)
},
}
let max_energy = tgt_energy.max(fwd_energy).max(fwd_res_energy).max(bwd_energy).max(bwd_res_energy);
let scale = norm_bits(max_energy, 31);
- let tgt_energy = tgt_energy << scale >> 16;
+ let tgt_energy = tgt_energy << scale >> 16;
let fwd_energy = fwd_energy << scale >> 16;
let fwd_res_energy = fwd_res_energy << scale >> 16;
let bwd_energy = bwd_energy << scale >> 16;