From 45b8480a35d5100f1575d77023fe0aa97eb29ac0 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Fri, 25 Jun 2021 21:27:46 +0100 Subject: [PATCH] Allow mutation of the SoundChannel --- agb/src/sound/mixer/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agb/src/sound/mixer/mod.rs b/agb/src/sound/mixer/mod.rs index 2068655d..4eda79ee 100644 --- a/agb/src/sound/mixer/mod.rs +++ b/agb/src/sound/mixer/mod.rs @@ -50,17 +50,17 @@ impl SoundChannel { } } - pub fn should_loop(mut self) -> Self { + pub fn should_loop<'a>(&'a mut self) -> &'a mut Self { self.should_loop = true; self } - pub fn playback(mut self, playback_speed: Num) -> Self { + pub fn playback<'a>(&'a mut self, playback_speed: Num) -> &'a mut Self { self.playback_speed = playback_speed; self } - pub fn panning(mut self, panning: Num) -> Self { + pub fn panning<'a>(&'a mut self, panning: Num) -> &'a mut Self { debug_assert!(panning >= Num::new(-1), "panning value must be >= -1"); debug_assert!(panning <= Num::new(1), "panning value must be <= 1"); @@ -68,7 +68,7 @@ impl SoundChannel { self } - pub fn high_priority(mut self) -> Self { + pub fn high_priority<'a>(&'a mut self) -> &'a mut Self { self.priority = SoundPriority::High; self }