Add resampleAudioBuffer utility - #90
Conversation
SamplePlayer requires buffers at the context's sample rate; consumers need a shared way to convert imported, recorded or previously loaded buffers.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC. WalkthroughThe package adds and exports ChangesAudio buffer resampling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The new resampling utility appears ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Summary by QodoAdd a public AudioBuffer resampling utility
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Exports
resampleAudioBuffer(buffer, sampleRate), which renders an AudioBuffer at another rate via OfflineAudioContext. Returns the input unchanged when rates match; rejects for unsupported rates.SamplePlayer requires buffers at the context's sample rate, so consumers (e.g. hljod-smali's sample-rate switch) can use this instead of their own conversion code. Loading behavior is unchanged.
Summary by CodeRabbit