Skip to content

refactor(wasapi): centralize stream error handling#1209

Merged
roderickvd merged 1 commit into
masterfrom
refactor/wasapi-controlflow
May 18, 2026
Merged

refactor(wasapi): centralize stream error handling#1209
roderickvd merged 1 commit into
masterfrom
refactor/wasapi-controlflow

Conversation

@roderickvd
Copy link
Copy Markdown
Member

Make process_input/process_output return Result and remove their error_callback parameter.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the WASAPI backend's stream loops so process_input/process_output return Result<(), Error> instead of ControlFlow<()>, centralizing error emission in the callers (run_input/run_output). Behavior is preserved: on error the error callback is invoked and the loop breaks; on the prior "continue" paths (Ok(0) packet size, buffer-empty), the functions simply return Ok(()) and the outer loop iterates.

Changes:

  • process_input/process_output no longer take an error_callback parameter and now propagate errors via ?.
  • run_input/run_output handle the returned Result by emitting through error_callback and breaking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@roderickvd roderickvd merged commit c3afb40 into master May 18, 2026
34 checks passed
@roderickvd roderickvd deleted the refactor/wasapi-controlflow branch May 18, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants