From c031e9b002bf2bb2c6b0068e3211519a455973a0 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Fri, 9 Dec 2022 23:33:25 +0000 Subject: [PATCH] Put the MixerBuffer in IWRAM --- agb/src/sound/mixer/sw_mixer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agb/src/sound/mixer/sw_mixer.rs b/agb/src/sound/mixer/sw_mixer.rs index cf161a30..3aac9438 100644 --- a/agb/src/sound/mixer/sw_mixer.rs +++ b/agb/src/sound/mixer/sw_mixer.rs @@ -84,7 +84,7 @@ pub struct Mixer { // SAFETY: Has to go before buffer because it holds a reference to it _interrupt_handler: InterruptHandler<'static>, - buffer: Pin>, + buffer: Pin>, channels: [Option; 8], indices: [i32; 8], frequency: Frequency, @@ -117,7 +117,7 @@ pub struct ChannelId(usize, i32); impl Mixer { pub(super) fn new(frequency: Frequency) -> Self { - let buffer = Box::pin(MixerBuffer::new(frequency)); + let buffer = Box::pin_in(MixerBuffer::new(frequency), InternalAllocator); // SAFETY: you can only ever have 1 Mixer at a time let fifo_timer = unsafe { Timer::new(0) };