mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-23 07:36:33 +11:00
Ensure you don't hand over an already done channel
This commit is contained in:
parent
025f4f5a91
commit
bd15a87c4d
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ impl Mixer {
|
||||||
|
|
||||||
pub fn get_channel(&mut self, id: &ChannelId) -> Option<&'_ mut SoundChannel> {
|
pub fn get_channel(&mut self, id: &ChannelId) -> Option<&'_ mut SoundChannel> {
|
||||||
if let Some(channel) = &mut self.channels[id.0] {
|
if let Some(channel) = &mut self.channels[id.0] {
|
||||||
if self.indices[id.0] == id.1 {
|
if self.indices[id.0] == id.1 && !channel.is_done {
|
||||||
return Some(channel);
|
return Some(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue