Allow the volume of NVDA sounds to be set within NVDA. (#15038)
Better solution for #1409. Addresses #14896 (comment). Also addresses feedback I received on Mastodon regarding the NVDA sounds volume not appearing in the Windows Volume Mixer in some versions of Windows.
Summary of the issue:
In Support for audio output using WASAPI #14697, I split NVDA speech and sounds into two separate Windows audio sessions to allow independent control of their levels. However, some users want these levels to be linked.
In Add setting to have the volume of NVDA sounds follow the voice volume. #14896, I made it possible to have the sounds volume follow the voice volume. However, as per Add setting to have the volume of NVDA sounds follow the voice volume. #14896 (comment), some synths don't set the volume in a linear way, so the volumes don't match.
It was reported to me on Mastodon that in Windows 11 Insider builds, the "NVDA sounds" volume doesn't show up in the Windows Volume Mixer unless you actively play a sound while the Volume Mixer is running. This is not very intuitive, and if this is behaviour Microsoft intends to keep, it isn't going to work well for our users.
Having the volume of NVDA sounds controlled outside of NVDA is a little cumbersome.
Description of user facing changes
There will now only be one entry for NVDA in the Windows Volume Mixer which will control all NVDA audio.
There will be a slider in NVDA Advanced Settings to control the volume of sounds.
Description of development approach
Removed the ability to set a WASAPI session and volume.
Added a method to set the volume of a stream. This also allows you to set the volume of individual channels, though that's not used yet.
Added a slider in Advanced Settings to control the volume of NVDA sounds. This is disabled if the sound volume is following the voice volume.