Skip to content

Default output device detection does not work correctly #17530

@Danstiv

Description

@Danstiv

Steps to reproduce:

Required at least two output devices to test.

  1. Make the second device the default device in windows settings.
  2. Make the first device the default device in nvda settings.

Actual behavior:

Sound is outputted to the default device selected in windows settings.

Expected behavior:

Sound should be outputted to the device selected in nvda settings.

NVDA logs, crash dumps and other attachments:

I found out that this behavior is caused by the WasapiWavePlayer._isDefaultDevice method.
return name == next(_getOutputDevices())[1] always returns true if the first device is the default device in nvda, which causes player to switch to the default device in windows.
This is probably leftover code from WinMM, but I haven't dived into the specifics of nvda's audio implementation, so I'm not sure what the best way to fix this is.
@SaschaCowley, maybe you have some ideas.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

alpha-34782,82fefa5a (2025.1.0.34782)

Windows version:

Windows 11 23H2 (AMD64) build 22631.4602

Name and version of other software in use when reproducing the issue:

Windows control panel.

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

2024.4 doesn't have this problem

If NVDA add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

Metadata

Metadata

Assignees

Labels

component/audioNVDA's audio output (nvWave, issues with usb audio etc).p2https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityrelease/blockingthis issue blocks the milestone releasetriagedHas been triaged, issue is waiting for implementation.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions