From e5c00523665030f1c826e0992b91fb630d1cbaf7 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Sun, 1 Jan 2023 18:48:15 +0100 Subject: [PATCH] Expanded InvalidChannel error and fixed types --- ctru-rs/src/services/ndsp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctru-rs/src/services/ndsp.rs b/ctru-rs/src/services/ndsp.rs index 71f8c48..bd00cfb 100644 --- a/ctru-rs/src/services/ndsp.rs +++ b/ctru-rs/src/services/ndsp.rs @@ -132,8 +132,8 @@ impl Channel { /// Set the channel's volume mix. /// Docs about the buffer usage: https://libctru.devkitpro.org/channel_8h.html#a30eb26f1972cc3ec28370263796c0444 - pub fn set_mix(&self, mix: &mut [f32; 12]) { - unsafe { ctru_sys::ndspChnSetMix(self.id, mix.as_mut_ptr()) } + pub fn set_mix(&self, mix: &[f32; 12]) { + unsafe { ctru_sys::ndspChnSetMix(self.id, mix.as_ptr().cast_mut()) } } /// Set the channel's rate of sampling.