feat(akroasis-core): cpal output backend, format negotiation, resampler#39
Merged
forkwright merged 2 commits intomainfrom Mar 11, 2026
Merged
feat(akroasis-core): cpal output backend, format negotiation, resampler#39forkwright merged 2 commits intomainfrom
forkwright merged 2 commits intomainfrom
Conversation
added 2 commits
March 11, 2026 22:11
Implements P1-06 output layer: - output/mod.rs: extend OutputParams with needs_resample, source_sample_rate, quality_tier fields for format negotiation results - output/format.rs: negotiate_format() decision tree (sample rate, bit depth, exclusive mode, quality tier); quantize() and quantize_into() for f64→i16/i24/i32/f32 - output/resample.rs: Resampler wrapping rubato 1.0 Async sinc (BlackmanHarris2, 256-tap, oversampling=256); pre-allocated interleaved buffers, allocation-free process_interleaved() after construction - output/cpal.rs: CpalOutputBackend — device enumeration, capabilities query, stream creation with raw format dispatch (f32/i32/i16), pre-allocated RT callback buffer, underrun silence fill; start/pause/close via StreamTrait - lib.rs: re-export Quantization and Resampler 47 tests passing, 1 ignored (integration). cargo clippy clean.
This was referenced Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
output/mod.rs: ExtendedOutputParamswithneeds_resample,source_sample_rate, andquality_tierfields so format negotiation results flow through to the backendoutput/format.rs:negotiate_format()implementing the full decision tree (sample rate selection, bit depth preference, exclusive mode, quality tier propagation);quantize()/quantize_into()for f64→i16/i24/i32/f32 byte conversionoutput/resample.rs:Resamplerwrapping rubato 1.0Asyncsinc (BlackmanHarris2 window, 256-tap, oversampling=256) with pre-allocated interleaved adapter buffers;process_interleaved()is allocation-free after constructionoutput/cpal.rs:CpalOutputBackend— device enumeration, capabilities query (probes common sample rates within eachSupportedStreamConfigRange),build_output_stream_rawformat dispatch (f32 > i32 > i16 preference), pre-allocated RT callback buffer with underrun silence fill and counter;start/pause/closevia cpalStreamTraitlib.rs: Re-exportsQuantizationandResamplerTest plan
cargo check— cleancargo test— 47 passed, 1 ignored (RT/hardware integration), 0 failedcargo clippy -- -D warnings— cleanavailable_devices,device_capabilities, stream open) are#[ignore]-gated, require a real audio deviceImplements P1-06. Blocks P1-07 (gapless) and P1-08 (engine).
🤖 Generated with Claude Code