From a92a2f503c9968937a26331c7fdffdd24b4dfedb Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sat, 30 Oct 2021 21:16:32 +0100 Subject: [PATCH] Reduce maximum number of sound channels to 8 --- agb/src/sound/mixer/sw_mixer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agb/src/sound/mixer/sw_mixer.rs b/agb/src/sound/mixer/sw_mixer.rs index a65c7ce4..c90a071d 100644 --- a/agb/src/sound/mixer/sw_mixer.rs +++ b/agb/src/sound/mixer/sw_mixer.rs @@ -20,8 +20,8 @@ extern "C" { pub struct Mixer { buffer: MixerBuffer, - channels: [Option; 16], - indices: [i32; 16], + channels: [Option; 8], + indices: [i32; 8], } pub struct ChannelId(usize, i32); @@ -75,7 +75,7 @@ impl Mixer { return Some(ChannelId(i, self.indices[i])); } - panic!("Cannot play more than 16 sounds at once"); + panic!("Cannot play more than 8 sounds at once"); } pub fn get_channel(&mut self, id: &ChannelId) -> Option<&'_ mut SoundChannel> {