Repository navigation
ASIO open retry after a quick failure - #1013
Merged
Merged
Conversation
An ASIO driver still locking its clock after a sample rate change fails its first open with "Can't start device" (#1007). PatientDevice closes the device and opens it again with the same channels, rate and buffer after 20, 80, 320 and 1280 ms. Only a failure under 1 s gets another attempt: JUCE's 3 s wait for a first callback already covers a slow one.
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.
For #1007.
ASIO devices now retry a failed open. Some ASIO drivers (the MOTU 24AO in #1007) need a second or more to lock their clock after a sample rate change. JUCE starts the device 10 ms after it sets the rate, so the first open fails with "Can't start device". The player then moves the rate back and forth until one open lands.
PatientDevicewraps each ASIO device:PatientDeviceTypewraps the ASIO type: its device list, default device, index lookup and change notices are the ASIO type's own. The driver's reset requests reach the device manager as before.The wrapper covers every open: the saved device at startup, the Audio settings dialog, the first-run wizard, and the output pairs the mixer opens.
Tests
functional.audio.patient-open:functional.audio.patient-type: the list, default and scan are the wrapped type's; a created device is patient, found at its place in the list, and opens at its second attempt; the wrapped type's change notices reach listeners.mp_tests --no-perf: 520 run, 0 failed.