mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
Put the MixerBuffer in IWRAM
This commit is contained in:
parent
6c27e770b3
commit
c031e9b002
|
@ -84,7 +84,7 @@ pub struct Mixer {
|
||||||
// SAFETY: Has to go before buffer because it holds a reference to it
|
// SAFETY: Has to go before buffer because it holds a reference to it
|
||||||
_interrupt_handler: InterruptHandler<'static>,
|
_interrupt_handler: InterruptHandler<'static>,
|
||||||
|
|
||||||
buffer: Pin<Box<MixerBuffer>>,
|
buffer: Pin<Box<MixerBuffer, InternalAllocator>>,
|
||||||
channels: [Option<SoundChannel>; 8],
|
channels: [Option<SoundChannel>; 8],
|
||||||
indices: [i32; 8],
|
indices: [i32; 8],
|
||||||
frequency: Frequency,
|
frequency: Frequency,
|
||||||
|
@ -117,7 +117,7 @@ pub struct ChannelId(usize, i32);
|
||||||
|
|
||||||
impl Mixer {
|
impl Mixer {
|
||||||
pub(super) fn new(frequency: Frequency) -> Self {
|
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
|
// SAFETY: you can only ever have 1 Mixer at a time
|
||||||
let fifo_timer = unsafe { Timer::new(0) };
|
let fifo_timer = unsafe { Timer::new(0) };
|
||||||
|
|
Loading…
Reference in a new issue