From 4c6d3af83e421494e1e23a644cb26fd57200dc44 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Thu, 24 Oct 2024 08:04:03 +0200 Subject: [PATCH] Rename io_s24 to io_i32_s24 --- src/pcm.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pcm.rs b/src/pcm.rs index 55d4947..6c600b9 100644 --- a/src/pcm.rs +++ b/src/pcm.rs @@ -225,12 +225,16 @@ impl PCM { pub fn io_u8(&self) -> Result> { self.io_checked() } pub fn io_i16(&self) -> Result> { self.io_checked() } pub fn io_u16(&self) -> Result> { self.io_checked() } - pub fn io_s24(&self) -> Result> { self.verify_format(Format::s24()).map(|_| IO::new(self)) } pub fn io_i32(&self) -> Result> { self.io_checked() } pub fn io_u32(&self) -> Result> { self.io_checked() } pub fn io_f32(&self) -> Result> { self.io_checked() } pub fn io_f64(&self) -> Result> { self.io_checked() } + /// For the `s24` format, represented by i32 + pub fn io_i32_s24(&self) -> Result> { self.verify_format(Format::s24()).map(|_| IO::new(self)) } + /// For the `u24` format, represented by u32 + pub fn io_u32_u24(&self) -> Result> { self.verify_format(Format::u24()).map(|_| IO::new(self)) } + pub fn io_checked(&self) -> Result> { self.verify_format(S::FORMAT).map(|_| IO::new(self)) } @@ -1237,7 +1241,7 @@ fn open_s24() { hwp.set_access(Access::RWInterleaved).unwrap(); pcm.hw_params(&hwp).unwrap(); assert_eq!(Format::s24().physical_width(), Ok(32)); - let _io = pcm.io_s24().unwrap(); + let _io = pcm.io_i32_s24().unwrap(); } #[test]