Skip to content

Oversampler and Resampler#97

Open
kunitoki wants to merge 3 commits into
mainfrom
dev/oversampling
Open

Oversampler and Resampler#97
kunitoki wants to merge 3 commits into
mainfrom
dev/oversampling

Conversation

@kunitoki
Copy link
Copy Markdown
Owner

@kunitoki kunitoki commented May 21, 2026

This pull request introduces two major new components to the yup_dsp resampling module: a reusable fixed-size circular buffer and a highly configurable multi-channel oversampler. These additions provide efficient sample history management and integer-factor oversampling with bandlimited interpolation, supporting real-time audio processing and block-based DSP algorithms.

New core DSP utilities:

  • CircularBuffer utility:
    • Implements a fixed-size, template-based circular (ring) buffer with O(1) push and random-access operations, intended for efficient sample history management in DSP algorithms. (yup_CircularBuffer.h)

Oversampling functionality:

  • Multi-channel integer-factor Oversampler:
    • Adds a template-based Oversampler class supporting arbitrary sample types, oversample factors, and sinc filter radii. Provides upsampling and downsampling with windowed sinc interpolation, per-channel history buffers, and block-based processing. (yup_Oversampler.h)
    • Includes methods for preparing, resetting, upsampling, downsampling, and processing oversampled blocks, with convenience type aliases for common configurations.
    • Integrates the new CircularBuffer for internal state and history management.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 99.13043% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.60%. Comparing base (6b1184d) to head (403d257).

Files with missing lines Patch % Lines
modules/yup_dsp/resampling/yup_Oversampler.h 99.09% 1 Missing ⚠️
modules/yup_dsp/resampling/yup_Resampler.h 98.48% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
+ Coverage   73.48%   73.60%   +0.11%     
==========================================
  Files         573      577       +4     
  Lines       56596    56826     +230     
==========================================
+ Hits        41590    41826     +236     
+ Misses      15006    15000       -6     
Files with missing lines Coverage Δ
modules/yup_dsp/resampling/yup_CircularBuffer.h 100.00% <100.00%> (ø)
modules/yup_dsp/resampling/yup_SincTable.h 100.00% <100.00%> (ø)
modules/yup_dsp/resampling/yup_Oversampler.h 99.09% <99.09%> (ø)
modules/yup_dsp/resampling/yup_Resampler.h 98.48% <98.48%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b1184d...403d257. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant