diff --git a/src/processor/memory/mmio/apu.rs b/src/processor/memory/mmio/apu.rs index b1dd501..785d8e7 100644 --- a/src/processor/memory/mmio/apu.rs +++ b/src/processor/memory/mmio/apu.rs @@ -114,12 +114,6 @@ impl Default for Mixer { } } -// impl Mixer { -// fn mix(&self, sample: DacSample) -> [f32; 2] { -// sample.mixed(self.vol_left, self.vol_right) -// } -// } - #[derive(Clone, Copy)] struct DacSample { one: f32, @@ -155,15 +149,12 @@ pub struct Apu { mixer: Mixer, div_apu: u8, buffer: Vec, - // converter: Samplerate, device: Device, config: StreamConfig, stream: Option, send_buffer: Option>>, } -// const TARGET_SAMPLERATE: u32 = 192000; - impl Default for Apu { fn default() -> Self { let host = cpal::default_host(); @@ -181,16 +172,6 @@ impl Default for Apu { .with_max_sample_rate() .config(); - // config.buffer_size = BufferSize::Fixed(2048 * 2); - - // let converter = Samplerate::new( - // ConverterType::Linear, - // TARGET_SAMPLERATE, - // config.sample_rate.0, - // 2, - // ) - // .unwrap(); - Self { mem: [0x0; MEM_SIZE], apu_enable: true, @@ -199,7 +180,6 @@ impl Default for Apu { mixer: Mixer::default(), div_apu: 0, buffer: vec![], - // converter, device, config, stream: None,