Fix auto switch to system default#121
Conversation
|
Warning Review limit reached
Next review available in: 23 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR removes an unused Changes
Sequence Diagram(s)sequenceDiagram
participant Driver as AudioDriver
participant Controller as AudioDriverController
participant Config as AudioConfiguration
Driver->>Controller: availableOutputDevicesChanged notify
Controller->>Controller: async::Async::call handleOutputDeviceChange
Controller->>Driver: close current device
Controller->>Driver: open(activeSpec)
alt open fails
Controller->>Driver: open(DEFAULT_DEVICE_ID)
alt still fails
Controller->>Config: defaultOutputSpec()
Controller->>Controller: switchToDefaultAudioDriver(spec)
Controller->>Driver: open(new driver, defaultSpec)
end
end
Controller->>Controller: notify output device listeners
Related issues: None specified. Related PRs: None specified. Suggested labels: audio, refactor Suggested reviewers: None specified. Poem: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@framework/audio/main/internal/audiodrivercontroller.cpp`:
- Around line 377-399: The fallback path in
AudioDriverController::handleOutputDeviceChange() ignores the result of
switchToDefaultAudioDriver(), so retry state can stay wrong after a successful
switch. Update the failure branch to capture the return value from
switchToDefaultAudioDriver() into ok, matching the existing pattern used
elsewhere, and then let m_retryOpenDevice reflect that final success or failure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f09266c7-57eb-47a5-815a-503763a1634c
📒 Files selected for processing (9)
framework/audio/common/audiotypes.hframework/audio/driver/platform/win/asio/asioaudiodriver.cppframework/audio/main/iaudioconfiguration.hframework/audio/main/internal/audioconfiguration.cppframework/audio/main/internal/audioconfiguration.hframework/audio/main/internal/audiodrivercontroller.cppframework/audio/main/internal/audiodrivercontroller.hframework/stubs/audio/audioconfigurationstub.cppframework/stubs/audio/audioconfigurationstub.h
💤 Files with no reviewable changes (1)
- framework/audio/common/audiotypes.h
6c83d88 to
57db675
Compare
* ASIO reset() now fires availableOutputDevicesChanged instead of self-handling close/reopen, matching the WASAPI behavior * AudioDriverController::checkOutputDevice() falls back to the default audio driver (WASAPI) if reopen fails
57db675 to
e3ae987
Compare
Ports: musescore/MuseScore#33569