From 0b5d6f79784c1f9cfd68cc2fad8f5a762157deb7 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Fri, 25 Jun 2021 22:26:00 +0100 Subject: [PATCH] Add a method to stop a playing sound --- agb/src/sound/mixer/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/agb/src/sound/mixer/mod.rs b/agb/src/sound/mixer/mod.rs index f9e210b1..04b0dfec 100644 --- a/agb/src/sound/mixer/mod.rs +++ b/agb/src/sound/mixer/mod.rs @@ -90,4 +90,8 @@ impl SoundChannel { self.volume = volume; self } + + pub fn stop(&mut self) { + self.is_done = true + } }