Number of channel is configurable

This commit is contained in:
Gwilym Inzani 2024-06-08 16:35:30 +01:00
parent 8899a56f65
commit 2fa574684c

View file

@ -2,11 +2,12 @@ use agb_fixnum::Num;
use std::{borrow::Cow, num::Wrapping}; use std::{borrow::Cow, num::Wrapping};
const BUFFER_SIZE: usize = 560; const BUFFER_SIZE: usize = 560;
const NUM_CHANNELS: usize = 8;
#[derive(Default)] #[derive(Default)]
pub struct Mixer { pub struct Mixer {
channels: [Option<SoundChannel>; 8], channels: [Option<SoundChannel>; NUM_CHANNELS],
indices: [Wrapping<usize>; 8], indices: [Wrapping<usize>; NUM_CHANNELS],
} }
impl Mixer { impl Mixer {