Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5146206
feat: add high-quality resampler
roderickvd Jan 21, 2026
6a2f1ae
refactor: use Resample for sample rate conversion
roderickvd Feb 1, 2026
a3c5909
fix: conditionally test channel volume
roderickvd Feb 1, 2026
e1f0224
docs: update changelog
roderickvd Feb 2, 2026
6c90dee
refactor: replace SampleRateConverter with Resample wrapper
roderickvd Feb 9, 2026
759d90a
fix: clippy lint on 64bit
roderickvd Feb 9, 2026
ba5b69f
refactor: split resample into multiple modules
roderickvd Feb 12, 2026
df6ed95
style: cargo fmt
roderickvd Feb 12, 2026
c3cd210
refactor: address review points
roderickvd May 15, 2026
bea750d
fix: compilation with 64bit
roderickvd May 15, 2026
3277192
chore: update to Rubato v2.0
roderickvd May 15, 2026
90c74dd
fix: rebasing mistakes
roderickvd May 15, 2026
d9a6366
feat: add WAV output option to resample example
roderickvd May 15, 2026
9264344
fix: correct span-boundary cap counter, partial-chunk output trimming…
roderickvd May 31, 2026
7f12f13
refactor: move gcd to math, trim oversampling doc, fix TestSource try…
roderickvd May 31, 2026
eccb128
fix: current_span_len overcounts by delay offset on first output chunk
roderickvd May 31, 2026
0f8f274
refactor: move resampler to conversions::SampleRateConverter
roderickvd Jun 7, 2026
75d7873
chore: update to Rubato 3.0
roderickvd Jun 7, 2026
2f0051d
clippy
yara-blue Jul 11, 2026
3a52e50
Nits: move tests to their own module, pub(crate) instead of pub
yara-blue Jul 11, 2026
90d9ba3
add tracing support for CPU-intensive respamling warning
yara-blue Jul 11, 2026
0ea6c39
refactor resampler creation
yara-blue Jul 11, 2026
bfd8c45
Introduce newypes and split next_sample up
yara-blue Jul 11, 2026
46dd8de
Deduplicate sample/frame duality
yara-blue Jul 12, 2026
71654b5
Move mixer tests to their own file
yara-blue Jul 13, 2026
ca72dac
add dedicated input datastructure
yara-blue Jul 13, 2026
ca891f7
fix mixer test accounting for zero padding
yara-blue Jul 13, 2026
856eca9
fix off by one in refactored resampler
yara-blue Jul 14, 2026
0d65117
make CI read MSRV field from toml to get toolchain
yara-blue Jul 14, 2026
9f0dfae
Fix rubato-fft to work with new refactorings
yara-blue Jul 14, 2026
f998ad6
re-enable tests
yara-blue Jul 19, 2026
6194c45
Replace broken self.input.exhausted() by checking frames from fill_input
yara-blue Jul 19, 2026
129fce8
style refactors
yara-blue Jul 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,27 @@ env:
CARGO_INCREMENTAL: 0

jobs:
msrv:
name: Get MSRV
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-msrv.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read MSRV from Cargo.toml
id: get-msrv
run: |
version=$(grep -m1 '^rust-version' Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')
echo "version=$version" >> "$GITHUB_OUTPUT"

tests:
name: Tests
needs: msrv
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
toolchain: ["1.89"]
include:
- os: macos-latest
MACOS: true
Expand All @@ -31,8 +44,8 @@ jobs:
run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends libasound2-dev pkg-config libjack-jackd2-dev libjack-jackd2-0 libdbus-1-dev libpipewire-0.3-dev
if: contains(matrix.os, 'ubuntu')

- name: Install ${{ matrix.toolchain }} toolchain
run: rustup toolchain install ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Install ${{ needs.msrv.outputs.version }} toolchain
run: rustup toolchain install ${{ needs.msrv.outputs.version }} && rustup default ${{ needs.msrv.outputs.version }}

- name: Install stable toolchain for clippy
run: rustup toolchain install stable
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- All sources now implement `Iterator::size_hint()`.
- `Chirp` now implements `try_seek`.
- Added `DEFAULT_SAMPLE_RATE` set to match `cpal::SAMPLE_RATE_48K`.
- Added `Source::resample` and `ResampleConfig` for high-quality sample rate conversion.

### Changed

Expand All @@ -25,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Explicitly document the requirement for sources to return complete frames.
- Ensured decoders to always return complete frames, as well as `TakeDuration` when expired.
- Breaking: `Zero::new_samples()` now returns `Result<Self, ZeroError>` requiring a frame-aligned number of samples.
- Breaking: `SampleRateConverter` now wraps a `Source` instead of an `Iterator` and takes a `ResampleConfig`.
- Improved queue, buffer, mixer and sample rate conversion performance.
- Default sample rate changed from 44.1 kHz to 48 kHz consistently.
- `open_sink_or_fallback` now tries 48 kHz and 44.1 kHz before the device's maximum sample rate.
Expand Down Expand Up @@ -91,6 +93,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `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.
- Added `Resample` source for high-quality sample rate conversion.
- Added `FromIter` source that wraps a sample iterator.
- Added `ChannelCountConverter::inner()` for immutable access to the underlying iterator.
- `ChannelCountConverter` now implements `Source`.
- Added `FromIter::{inner, inner_mut, into_inner}` accessor methods.

### Fixed

Expand All @@ -104,6 +111,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed `Empty` source to properly report exhaustion.
- Fixed `Zero::current_span_len` returning remaining samples instead of span length.

### Deprecated
- `SampleRateConverter` is deprecated in favor of using `Resample` with `FromIter`.
- `FromFactoryIter` type is deprecated, renamed to `FromFn`.
- `from_factory()` function is deprecated, renamed to `from_fn()`.

### Changed

- Breaking: _Sink_ terms are replaced with _Player_ and _Stream_ terms replaced
Expand All @@ -125,6 +137,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Upgraded `cpal` to v0.17.
- Clarified `Source::current_span_len()` contract documentation.
- Improved queue, mixer and sample rate conversion performance.
- `SampleRateConverter` uses the new `Resample` source for better quality.
- Renamed `FromIter` for sequencing multiple sources to `Chain`.
- Renamed `FromFactoryIter` for generating sources from a function to `FromFn`.

## Version [0.21.1] (2025-07-14)

Expand Down
Loading
Loading