From 052bf829a5460c0b2e7594d78faa011dbcbb2395 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sun, 19 Feb 2023 19:22:56 +1100 Subject: [PATCH] =?UTF-8?q?audio=20=F0=9F=A4=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/processor/memory/mmio/apu.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/processor/memory/mmio/apu.rs b/src/processor/memory/mmio/apu.rs index 6c79bd7..fcb9ae3 100644 --- a/src/processor/memory/mmio/apu.rs +++ b/src/processor/memory/mmio/apu.rs @@ -29,10 +29,10 @@ const fn reg(a: Address) -> usize { } impl DacSample { - fn mixed(&self, mixer: &Mixer) -> [f32; 2] { + fn mixed(&self, mixer: &Mixer) -> Vec { let left = (self.one * mixer.ch1.left.scale()) + (self.two * mixer.ch2.left.scale()); let right = (self.one * mixer.ch1.right.scale()) + (self.two * mixer.ch2.right.scale()); - [ + vec![ self.mix_channel(left, mixer.vol_left), self.mix_channel(right, mixer.vol_right), ] @@ -75,7 +75,7 @@ impl Default for Apu { .with_max_sample_rate(); let converter = Samplerate::new( - ConverterType::SincBestQuality, + ConverterType::ZeroOrderHold, CLOCK_SPEED as u32, config.sample_rate().0, config.channels().into(),