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 6f55e821..93e01b48 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 iterator + #[inline] + pub fn inner(&self) -> &I { + &self.input + } + fn next_input_span(&mut self) { self.current_span_pos_in_chunk += 1;