nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.12k stars 638 forks source link

WASAPI: Disable default communication ducking for all NVDA audio streams. #17374

Closed jcsteh closed 1 week ago

jcsteh commented 2 weeks ago

Link to issue number:

Fixes #17349.

Summary of the issue:

Windows has a concept of communication audio streams. When an app (Skype, Signal, Discord, Phone Link, etc.) opens a communication audio stream, by default, the volume of audio from non-communication apps is significantly reduced. This includes NVDA. This effectively makes NVDA unusable for speech users while on a call with such an application.

There is a setting to disable this for all audio streams on the system: Sound Properties -> Communications -> WhenWindows detects communications activity: Do nothing. However:

  1. This doesn't work properly, which seems to be a long standing Windows bug.
  2. Even if it did, I don't think we ever want NVDA's audio to be ducked by the system, regardless of this setting.

Description of user facing changes

When using applications such as Skype, Discord, Signal and Phone Link for audio communication, NVDA speech and sounds no longer decrease in volume.

Description of development approach

Windows allows this default ducking experience to be disabled for a WASAPI stream. This change calls the appropriate API methods in WasapiPlayer to opt out of this ducking.

Testing strategy:

I tested this with Phone Link. Before this change, making a phone call would cause NVDA speech to severely decrease in volume. After this change, NVDA's volume remains untouched.

Known issues with pull request:

None.

Code Review Checklist:

@coderabbitai summary