nvda
259b0408 - Fix error when using tones.beep (PR #12804)

Commit
4 years ago
Fix error when using tones.beep (PR #12804) Fixes #12620 # Summary of the issue: Exceptions could escape nvWave when an audio device is being changed / removed. To stress test this, call tones.beep repeatedly and connect / disconnect audio devices. When nvWave is in error, logHandler would still try to beep. This caused additional errors in the log. The additional errors make debugging harder. # Description of how this pull request fixes the issue: The exception escapes from 'sync', wrap this in a try / except stop also ignored failures, and could call to _idleUnbuffered, which calls sync. Sync asserts that _waveout is not None. The failures are no longer ignored. Prevent logHandler calling beep when nvWave is in an error state.
Author
Parents
Loading