From a7171b6861f2110096e3a590388a007999d06cc7 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Sun, 15 Jan 2023 13:19:29 +0100 Subject: [PATCH] Removed references to ADPCM formats and added an internal statement --- ctru-rs/src/services/ndsp/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ctru-rs/src/services/ndsp/mod.rs b/ctru-rs/src/services/ndsp/mod.rs index 255e0ff..e5017f3 100644 --- a/ctru-rs/src/services/ndsp/mod.rs +++ b/ctru-rs/src/services/ndsp/mod.rs @@ -23,7 +23,6 @@ pub enum OutputMode { pub enum AudioFormat { PCM8Mono = ctru_sys::NDSP_FORMAT_MONO_PCM8, PCM16Mono = ctru_sys::NDSP_FORMAT_MONO_PCM16, - ADPCMMono = ctru_sys::NDSP_FORMAT_MONO_ADPCM, PCM8Stereo = ctru_sys::NDSP_FORMAT_STEREO_PCM8, PCM16Stereo = ctru_sys::NDSP_FORMAT_STEREO_PCM16, } @@ -153,7 +152,9 @@ impl Channel { unsafe { ctru_sys::ndspChnSetRate(self.0.into(), rate) }; } - // TODO: find a way to wrap `ndspChnSetAdpcmCoefs` + // `ndspChnSetAdpcmCoefs` isn't wrapped on purpose. + // DSPADPCM is a proprietary format used by Nintendo, unavailable by "normal" means. + // We suggest using other wave formats when developing homebrew applications. /// Clear the wave buffer queue and stop playback. pub fn clear_queue(&self) { @@ -248,7 +249,7 @@ impl AudioFormat { /// 16 bit formats return 2 (bytes) pub fn sample_size(self) -> u8 { match self { - AudioFormat::PCM8Mono | AudioFormat::ADPCMMono => 1, + AudioFormat::PCM8Mono => 1, AudioFormat::PCM16Mono | AudioFormat::PCM8Stereo => 2, AudioFormat::PCM16Stereo => 4, }