nvda
c3195e90 - Handle playing waves with no enabled audio render endpoints connected" (#18579)

Commit
195 days ago
Handle playing waves with no enabled audio render endpoints connected" (#18579) Related to #18544 Summary of the issue: If `nvwave.playWaveFile` is called on a system with no enabled audio render endpoints, an `OSError` is raised. Description of user facing changes: None Description of developer facing changes: The error is now logged at level debugwarning, and `playWaveFile` returns immediately. All other exceptions (including other cases of `OSError`), are still raised. Description of development approach: Wrap instantiation of `WavePlayer` in a try/except block. Except `OSError`, and check that the exception's `winerror` is `ERROR_NOT_FOUND`. In this case, log and return. In other cases of `OSError`, re-raise the exception. Testing strategy: Disabled all render endpoints. Ran NVDA from source, and connected in via NVDA Remote Access. Used `nvwave.playWaveFile`, and checked the log to ensure the error was logged. Known issues with pull request: None
Author
Parents
Loading