-use std::rc::Rc;
-use std::cell::RefCell;
use nihav_core::formats::*;
use nihav_core::frame::*;
use nihav_core::codecs::*;
}
fn synth_audio(&mut self, dsp: &mut DSP, abuf: &mut NABufferType, srate_idx: usize) {
let mut adata = abuf.get_abuf_f32().unwrap();
- let mut output = adata.get_data_mut();
+ let output = adata.get_data_mut().unwrap();
let off0 = abuf.get_offset(self.channel);
let off1 = abuf.get_offset(self.channel + 1);
self.ics[0].synth_channel(dsp, &mut output[off0..], srate_idx);
}
struct AACDecoder {
- info: Rc<NACodecInfo>,
+ info: NACodecInfoRef,
chmap: NAChannelMap,
m4ainfo: M4AInfo,
pairs: Vec<ChannelPair>,
}
impl NADecoder for AACDecoder {
- fn init(&mut self, info: Rc<NACodecInfo>) -> DecoderResult<()> {
+ fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Audio(_) = info.get_properties() {
let edata = info.get_extradata().unwrap();
validate!(edata.len() >= 2);