From 09e26b94730b44310f54dcf7c706240f3988ed13 Mon Sep 17 00:00:00 2001 From: adhoc Date: Thu, 29 Jan 2026 15:17:09 +0100 Subject: [PATCH 1/2] add get_ref to SampleRateConverter --- src/conversions/sample_rate.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/conversions/sample_rate.rs b/src/conversions/sample_rate.rs index 6f55e821..8a5ec5b6 100644 --- a/src/conversions/sample_rate.rs +++ b/src/conversions/sample_rate.rs @@ -95,12 +95,18 @@ where self.input } - /// get mutable access to the iterator + /// Get mutable access to the iterator #[inline] pub fn inner_mut(&mut self) -> &mut I { &mut self.input } + /// Get a reference to the underlying interator + #[inline] + pub fn get_ref(&self) -> &I { + &self.input + } + fn next_input_span(&mut self) { self.current_span_pos_in_chunk += 1; From e56d91ab24f2c2317c9cfbba5fc539e3e27ab880 Mon Sep 17 00:00:00 2001 From: adhoc Date: Fri, 30 Jan 2026 13:05:52 +0100 Subject: [PATCH 2/2] fixes --- CHANGELOG.md | 1 + src/conversions/sample_rate.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a92dc673..d657513d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `DitherAlgorithm` enum for algorithm selection - `Source::dither()` function for applying dithering - Added `64bit` feature to opt-in to 64-bit sample precision (`f64`). +- Added `SampleRateConverter::inner` to get underlying iterator by ref. ### Fixed - docs.rs will now document all features, including those that are optional. diff --git a/src/conversions/sample_rate.rs b/src/conversions/sample_rate.rs index 8a5ec5b6..93e01b48 100644 --- a/src/conversions/sample_rate.rs +++ b/src/conversions/sample_rate.rs @@ -101,9 +101,9 @@ where &mut self.input } - /// Get a reference to the underlying interator + /// Get a reference to the underlying iterator #[inline] - pub fn get_ref(&self) -> &I { + pub fn inner(&self) -> &I { &self.input }