Skip to content

Fix no speech after removed USB audio device - #11978

Merged
feerrenrut merged 2 commits into
betafrom
fixUsbSoundDeviceRemovedError
Jan 4, 2021
Merged

Fix no speech after removed USB audio device#11978
feerrenrut merged 2 commits into
betafrom
fixUsbSoundDeviceRemovedError

Conversation

@feerrenrut

Copy link
Copy Markdown
Contributor

Link to issue number:

#11968

Summary of the issue:

An error during a call to nvWave.stop does not reset the device state, and allows the error to propagate all the way up the stack, leaving nvWave in an unknown state.

Description of how this pull request fixes the issue:

Ensure all calls to winmm that take the _waveout param 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 that windll.kernel32.SetEvent(self._waveout_event) gets called to prevent sync from blocking on waitForSingleObject.

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

@AppVeyorBot

This comment has been minimized.

@feerrenrut

Copy link
Copy Markdown
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 LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, looks good @feerrenrut

@feerrenrut
feerrenrut merged commit 80bd360 into beta Jan 4, 2021
@feerrenrut
feerrenrut deleted the fixUsbSoundDeviceRemovedError branch January 4, 2021 06:39
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone Jan 4, 2021
@LeonarddeR

LeonarddeR commented Jan 4, 2021 via email

Copy link
Copy Markdown
Collaborator

@feerrenrut feerrenrut modified the milestones: 2021.1, 2020.4 Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants