Fix no speech after removed USB audio device - #11978
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
The system test failure is very likely unrelated, I have kicked off another build. I have confirmation from three testers of the the try build that this resolves their issue. I believe this is ready for review. |
LeonarddeR
approved these changes
Dec 31, 2020
LeonarddeR
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, looks good @feerrenrut
Collaborator
|
Could we have this in master as soon as possible?
|
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.
Link to issue number:
#11968
Summary of the issue:
An error during a call to
nvWave.stopdoes not reset the device state, and allows the error to propagate all the way up the stack, leavingnvWavein an unknown state.Description of how this pull request fixes the issue:
Ensure all calls to
winmmthat take the_waveoutparam are wrapped in try blocks. On error, close the device and log (nvwave category). This should force nvWave to re-open on the next feed, and will ensure thatwindll.kernel32.SetEvent(self._waveout_event)gets called to preventsyncfrom blocking onwaitForSingleObject.Testing performed:
I don't have a USB audio device for testing, I'll ask reporters to test a try build.
Known issues with pull request:
Will require extensive testing.
Change log entry:
None