diff --git a/agb/examples/mixer_basic.rs b/agb/examples/mixer_basic.rs index 0dbdb630..a5a982b1 100644 --- a/agb/examples/mixer_basic.rs +++ b/agb/examples/mixer_basic.rs @@ -42,6 +42,8 @@ fn main(mut gba: Gba) -> ! { if input.is_pressed(Button::L) { channel.volume(half); + } else if input.is_pressed(Button::R) { + channel.volume(20.into()); // intentionally introduce clipping } else { channel.volume(1.into()); } diff --git a/agb/src/sound/mixer/mod.rs b/agb/src/sound/mixer/mod.rs index d537d3cc..9ff2db63 100644 --- a/agb/src/sound/mixer/mod.rs +++ b/agb/src/sound/mixer/mod.rs @@ -96,7 +96,6 @@ impl SoundChannel { #[inline(always)] pub fn volume(&mut self, volume: Num<i16, 4>) -> &mut Self { - assert!(volume <= Num::new(1), "volume must be <= 1"); assert!(volume >= Num::new(0), "volume must be >= 0"); self.volume = volume;