Try to fix ASIO4ALL hang - #3862
Closed
ann0see wants to merge 2 commits into
Closed
Conversation
added 2 commits
August 6, 2026 21:36
ann0see
marked this pull request as ready for review
August 6, 2026 20:22
ann0see
marked this pull request as draft
August 6, 2026 20:23
Member
Author
|
There's something weird going on with the CI. Unsure why the CI does not run |
ann0see
commented
Aug 6, 2026
| // outside the mutex: a driver may block inside them until its audio thread | ||
| // returns from bufferSwitch(), which would deadlock if the mutex were held | ||
| // here (see issue #3779) | ||
| ASIOMutex.lock(); // get mutex lock |
Member
Author
There was a problem hiding this comment.
Not sure if this exists, but a syntax like lock {.Init()} would be good. Otherwise also we could have a look at the .Init function to add the lock there - maybe.
Member
There was a problem hiding this comment.
Instead of the separate lock and unlock, you could always do:
{
QMutexLocker locker ( &ASIOMutex );
vecsMultChanAudioSndCrd.Init ( iASIOBufferSizeStereo );
}
That would also unlock if Init() threw an exception.
ann0see
commented
Aug 6, 2026
| // if we are not running, ignore any stray callback (e.g. from ASIO4ALL's | ||
| // emulation thread during Init()/teardown) so that it cannot block on | ||
| // ASIOMutex which is owned by the re-init thread (see issue #3779) | ||
| if ( !pSound->bRun ) |
Member
Author
There was a problem hiding this comment.
Even if this is not needed - I suspect it not being problematic to add
Member
Author
|
Local reproduction shows that this is not yet fixed. |
Member
Author
|
Closing as does not fix issue. |
This was referenced Aug 8, 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.
Short description of changes
Draft PR narrowing lock and adding guard. Needs testing and human review. Authorship will be changed once I'm more comfortable.
CHANGELOG: Windows: Fix hang on ASIO4ALL
Context: Fixes an issue?
Fixes: #3779
Does this change need documentation? What needs to be documented and how?
No
Status of this Pull Request
PoC
What is missing until this pull request can be merged?
Review and Windows tests
Checklist
AUTOBUILD: Please build all targets