mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 08:41:34 +11:00
Reduce maximum number of sound channels to 8
This commit is contained in:
parent
301e2c115a
commit
a92a2f503c
|
@ -20,8 +20,8 @@ extern "C" {
|
||||||
|
|
||||||
pub struct Mixer {
|
pub struct Mixer {
|
||||||
buffer: MixerBuffer,
|
buffer: MixerBuffer,
|
||||||
channels: [Option<SoundChannel>; 16],
|
channels: [Option<SoundChannel>; 8],
|
||||||
indices: [i32; 16],
|
indices: [i32; 8],
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ChannelId(usize, i32);
|
pub struct ChannelId(usize, i32);
|
||||||
|
@ -75,7 +75,7 @@ impl Mixer {
|
||||||
return Some(ChannelId(i, self.indices[i]));
|
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> {
|
pub fn get_channel(&mut self, id: &ChannelId) -> Option<&'_ mut SoundChannel> {
|
||||||
|
|
Loading…
Reference in a new issue