Skip to content

Synthesizer dialog: rename empty string in output device names to 'Microsoft Sound Mapper'#11353

Merged
feerrenrut merged 2 commits into
nvaccess:masterfrom
josephsl:i11349MSSoundMapperDeviceName
Jul 13, 2020
Merged

Synthesizer dialog: rename empty string in output device names to 'Microsoft Sound Mapper'#11353
feerrenrut merged 2 commits into
nvaccess:masterfrom
josephsl:i11349MSSoundMapperDeviceName

Conversation

@josephsl

@josephsl josephsl commented Jul 8, 2020

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #11349

Summary of the issue:

On Windows 10 Version 2004 (20H1) and 20H2, an empty string is returned when asking Windows for the friendly name of WAVE_MAPPER constant (-1). In older Windows releases, this is named 'Microsoft Sound Mapper'.

Description of how this pull request fixes the issue:

If an empty string is returned, rename it to "Microsoft Sound Mapper" when listing output devices found in synthesizer dialog.

Testing performed:

Tested by calling nvwave.GetOuputDeviceNames on thefollowing Windows 10 releases:

  • Windows 10 earlier than 2004: first entry is "Microsoft Sound Mapper"
  • Windows 10 Version 2004 and 20H2: first entry is an empty string
  • Windows dev build 20161: first entry is "Microsoft Sound Mapper"

And making sure that for the second scenario, output device list found in synthesizer dialog says "Microsoft Sound Mapper". This was also confirmed on a virtual machine running build 20161 with Korean language pack installed - MS Sound Mapper entry is correctly translated.

Known issues with pull request:

None

Change log entry:

Bug fixes:

On Windows 10 May 2020 Update, NVDA will no longer show an empty device for Microsoft Sound Mapper when viewing output devices from synthesizer dialog. (#11349)

Or a more friendly entry if needed.

Thanks.

…crosoft Sound Mapper'. Re nvaccess#11349.

On Windows 10 Version 2004 (20H1) and 20H2, an empty string is returned when asking Windowd for the friendly name of WAVE_MAPPER constant (-1). In older Windows releases, this is named 'Microsoft Sound Mapper'. Therefore call it that when enumerating device names for 'output device' list in synthesizer dialog in NVDA.

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, thanks @josephsl

@josephsl

josephsl commented Jul 13, 2020 via email

Copy link
Copy Markdown
Contributor Author

@feerrenrut feerrenrut merged commit 4eb6f52 into nvaccess:master Jul 13, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.3 milestone Jul 13, 2020
@feerrenrut

Copy link
Copy Markdown
Contributor

When the device name is fetched (using waveOutGetDevCapsW), it seems that the return value for waveOutGetDevCapsW isn't checked in nvwave._getOutputDevices

Doing so might improve the robustness of this, see docs for possible return values

@josephsl

josephsl commented Jul 13, 2020 via email

Copy link
Copy Markdown
Contributor Author

@josephsl josephsl deleted the i11349MSSoundMapperDeviceName branch July 19, 2020 22:08
@feerrenrut

Copy link
Copy Markdown
Contributor

I meant that checking the return value could help to detect other errors earlier.

@josephsl

josephsl commented Jul 22, 2020 via email

Copy link
Copy Markdown
Contributor Author

@josephsl

Copy link
Copy Markdown
Contributor Author

Hi,

Fixed in a summer cumulative update, therefore a candidate for reversion.

Thanks.

josephsl added a commit to josephsl/nvda that referenced this pull request Sep 16, 2020
…(PR nvaccess#11353)"

This reverts commit 4eb6f52, as a summer cumulative update for Windows 10 Version 2004 (and 20H2) fixed it.
feerrenrut pushed a commit that referenced this pull request Sep 21, 2020
…anslated. (PR #11627)

In a summer 2020 cumulative update for Windows 10 May 2020 Update, Microsoft Sound Mapper is once again printed when asking for audio output device names but is not translated. Therefore 'translate' this entry. This change is only applicable to 2020 feature updates (May 2020 Update/20H1 and 20H2).

Fixes #11349
Tweaks #11353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nvwave/output devices enumeration: first output device is an empty string in Windows 10 Version 2004 and later

3 participants