commented code

This commit is contained in:
Alex Janka 2023-02-16 16:11:04 +11:00
parent ffdd458fbb
commit 08da9f7857

View file

@ -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<DacSample>,
// converter: Samplerate,
device: Device,
config: StreamConfig,
stream: Option<Stream>,
send_buffer: Option<Sender<Vec<[f32; 2]>>>,
}
// 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,