Repository: nvaccess/nvda

Issue:
Revert "Synthesizer dialog: ensure 'Microsoft Sound Mapper' is named
### Link to issue number:
Reverts #11353 
Original issue: #11349 

### Summary of the issue:
In earlier releases of Windows 10 Version 2004 (May 2020 Update), Microsoft Sound Mapper was not named (empty string). IN a summer cumulative update for 2004 (and 20H2), this problem is gone.

### Description of how this pull request fixes the issue:
Reverts PR #11353 via beta branch.

### Testing performed:
Tested via source and from Python Console (in 2020.2 and 2020.3 beta) to make sure Microsoft Sound Mapper is listed (tested on both 2004 and 20H2).

### Known issues with pull request:
None

### Change log entry:
None (#11349 entry removed as part of this PR).

Thanks.
nvwave/output devices enumeration: first output device is an empty string in Windows 10 Version 2004 and later
Hi,

Reported on Twitter and subsequently confirmed:

### Steps to reproduce:
With Windows 10 Version 2004 (May 2020 Update) installed, open NVDA's synthesizer dialog (Control+NVDA+S). Then see which devices are listed under output device combo box.

### Actual behavior:
An empty string is displayed at the top.

### Expected behavior:
A default output device name (such as Microsoft Sound Mapper) is shown.

### System configuration
#### NVDA installed/portable/running from source:
Installed and portable

#### NVDA version:
2020.1, 2020.2 beta 2, alpha-20514

#### Windows version:
Windows 10 Version 20H2 beta (build 19042.330)

#### Name and version of other software in use when reproducing the issue:
None

#### Other information about your system:
Multiple sound devices present (internal sound card, wireless headset)

### 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.
Versions listed above exhibit the same problem

#### If addons are disabled, is your problem still occurring?
Yes

#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
Not applicable

### Additional context:
This issue occurs in Version 2004 and later (Version 1909 did return the correct name for the first selected output device). This suggests something going on with device capabilities functions found in winmm.dll which are used to build output device names.

Thanks.


Discussion:
Hi,

Two things:

1. Should this problem occur again, we can revisit implementation discussion found in #11353 until Microsoft fixes it (again).
2. The reason for basing this on beta branch is due to upcoming translatable string freeze and because the PR being reverted is a 2020.3 material.

Thanks.
Hi,

Note that in some cases, "Microsoft Sound Mapper" isn't localized in Windows, but at least the fact that the label for it is back shows the fundamental issue was solved.

Thanks.
As @josephsl pointed out above even though "Microsoft Sound Mapper" is once again named its name is not translated even for locales for which its name was translated for earlier Windows versions. From the end user perspective this is a regression. How about changing this PR such that if the first entry in the devices list is either empty or "Microsoft Sound Mapper" the translated name is used?
> From the end user perspective this is a regression. How about changing this PR such that if the first entry in the devices list is either empty or "Microsoft Sound Mapper" the translated name is used?

I think this makes sense, there may also be users who haven't yet updated windows to the fixed version. 
I was able to reproduce this with 2019.3.X as well.

Confirmed with latest snapshot. TO clarify, there is no Windows Sound Mapper option, so if Windows was providing that placeholder name in the past, it is not now. Looked in latest TeamTalk, and it is exhibiting similar behavior, with placeholder text of input and output for the default.
So if Windows is providing a blank, NVDA may need to supply its own text of default, which can probably be assumed if the device name is blank and also first in the list.
Hi,

Note: this issue only affects 2004 and 20H2 - Microsoft Sound Mapper is listed in build 20161 (dev).

Thanks.
Hello everyone. I was the one who originally reported the bug. Just as an experiment, I turned on Narrator while in the NVDA synthesizer dialog and even Narrator was not able to read the Microsoft sound mapper item. Not sure if that means anything but figured I'd put that out there.
Hi, upon further investigation, it was determined that this is Windows release specific and affects all programs wishing to enumerate wave output devices. The good news is that it will be fixed in a future Windows 10 update. Once I finish looking at language issues (that is, making sure the setting in question is language independent), I’ll submit a pull request targeting alpha snapshots. Thanks.

 

From: agtheblade <notifications@github.com> 
Sent: Tuesday, July 7, 2020 4:57 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Author <author@noreply.github.com>
Subject: Re: [nvaccess/nvda] nvwave/output devices enumeration: first output device is an empty string in Windows 10 Version 2004 and later (#11349)

 

Hello everyone. I was the one who originally reported the bug. Just as an experiment, I turned on Narrator while in the NVDA synthesizer dialog and even Narrator was not able to read the Microsoft sound mapper item. Not sure if that means anything but figured I'd put that out there.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/11349#issuecomment-655199956> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4AXEA6NEVOM2PCNJBWQNDR2OY5BANCNFSM4OTA2LAA> .


Hi,

It appears the term "Microsoft Sound Mapper" has been localized in other languages. Therefore this must be an alpha-level change.

Thanks.
> I’ll submit a pull request targeting alpha snapshots.

I don't think this is necessary. If even Windows Narrator suffers from this issue, it is definitely an issue in Windows and a work around for this doesn't sound very important to me.
On Tue, 7 Jul 2020, Leonard de Ruijter wrote:

> I don't think this is necessary. If even Windows Narrator suffers from this issue, it is definitely an issue in Windows and a work around for this doesn't
> sound very important to me.

You might want to think of PR. "Well, NVDA doesn't have that problem, why 
does your screen reader?" :)

Indeed, fixed in a summer cumulative update, therefore this will be reverted. Thanks.

Resolving patch:
diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py
--- a/source/gui/settingsDialogs.py
+++ b/source/gui/settingsDialogs.py
@@ -960,7 +960,7 @@ def makeSettings(self, settingsSizer):
 		deviceListLabelText = _("Audio output  &device:")
 		deviceNames=nvwave.getOutputDeviceNames()
 		# #11349: On Windows 10 20H1 and 20H2, Microsoft Sound Mapper returns an empty string.
-		if not deviceNames[0]:
+		if deviceNames[0] in ("", "Microsoft Sound Mapper"):
 			# Translators: name for default (Microsoft Sound Mapper) audio output device.
 			deviceNames[0] = _("Microsoft Sound Mapper")
 		self.deviceList = settingsSizerHelper.addLabeledControl(deviceListLabelText, wx.Choice, choices=deviceNames)


Test patch: