-
-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keystrokes to adjust applications volume and mute #16273
Conversation
See test results for failed build of commit dd9a25b6f1 |
@mltony Thanks for implementing these highly requested items. One note, though: |
@mltony have you tested this feature in combination with Sound split feature? @amirsol81 we may consider key conflicts with very popular add-ons, but remember that at the end NVDA may be favoured and the add-ons need to adapt if there is no other acceptable gesture found for NVDA. |
Hi @mltony Demands related to volume adjustment and audio device control are very popular. So @huaiyinfeilong from the Chinese community developed the Audio Manager add-on. There are several features that we consider indispensable.
Maybe you or others can get some inspiration from it. Thanks |
@cary-rowen, the volume adjustment and muting of other apps as presented and implemented by @mltony has already been triaged (validated) by NV Access and already fulfills the need of many users. I understand that some users may need more specific features as described by you. I'd recommend to discuss this in a specific issue rather than in this PR. I think that there is already one opened, but if not, you can open a new one. If your issue is accepted (triaged), it may be implemented in a subsequent PR and maybe Tony is willing to do this. If it is rejected as a core feature because considered to target too few users, you still can ask the imploementation of a clean interface (specific functions, extension points, etc.) to ease the interfacing of the add-on (e.g. no patch). |
@CyrilleB79 |
@amirsol81,
Yes, both features use the same codepath, there are no issues as far as I can see. @cary-rowen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this very useful PR.
Here is my feedback. Except for English grammar, let me know if you find some remark not relevant and why.
Also I have two open questions that I'll ask separately so that it can be discussed out of this review.
user_docs/en/userGuide.t2t
Outdated
==== Mute other applications ====[MuteApplications] | ||
|
||
This checkbox allows to mute all applications other than NVDA. | ||
If any new applications start to output sound, their sound output will also be muted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous paragraph; feel free to accept or decline.
If any new applications start to output sound, their sound output will also be muted. | |
If any new applications start to output sound, its sound output will also be muted. |
Three more general questions regarding the user experience.
What is the link with the volumes in the Windows volume mixer? |
Sorry, I haven't tested this yet, but I saw @CyrilleB79's comment and I felt the need to give my opinion: Imo, adjusting the volume of other applications should be in sync with the system's volume synthesizer, whether it is mute state or volume, and conversely, when the user adjusts the volume or mute state of an app using the system volume synthesizer, NVDA should also Reflect this. Regarding what I call "system volume synthesizer", you can find it by pressing Win+B to find the speaker icon, pressing the Application key to pop up the menu, or open a similar application volume management by executing the settings URI in the run dialog( The AudioManager add-on I mentioned in my previous comment does this. Doing this ensures a consistent user experience. I'll test this PR later and if there's anything I've misunderstood in the above comment I'll collapse it. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some responses to @CyrilleB79's suggestions, and a few of my own.
A general comment about the documentation (apart from me still not being sure
why sndvol.exe or other Windows methods are insufficient for this purpose):
Regardless of how it is phrased, the control descriptions say something like:
"
This slider allows to set volume of all currently running applications except
for NVDA.
"
Note the words "currently running".
But then, Cyrille and I are debating in the line comments, about how to indicate
that this also effects "all new applications" that are started.
Why does it bother to say "currently running", if it also includes "running in
the future"?
Why isn't it just "all applications other than NVDA"?
The only reason you have to make clear "new applications" later, is because you
started from the prospective of only "currently running applications".
|
Because when you open a video (or an add) on internet, if the volume is too loud with respect to NVDA, it will be difficult to go to sndvol.exe and find the slider or the checkbox of your browser to lower or mute the volume of your browser. I agree that if possible, interacting with Windows mixer's volumes would be better. |
In this situation, I use NVDA+Shift+d to duck down that audio, then adjust if needed. |
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Luke Davis <8139760+XLTechie@users.noreply.github.com>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
I changed this; now I restore muted to False at startup.
Fixed
In my understanding there is no link. My guess is that the volume in volume mixer can be adjusted using ISimpleAudioVolume interface and we're using IChannelAudioVolume. But I haven't tested this hypothesis. |
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
In my understanding there is no link. My guess is that the volume in volume mixer can be adjusted using ISimpleAudioVolume interface and we're using
IChannelAudioVolume. But I haven't tested this hypothesis.
Doesn't this just confuse the situation for users even more?
CC @jcsteh
|
Thanks @mltony - can you reserve merge conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Reverts PR Reverts #16273 Issues fixed Fixes #16409 Fixes #16402 Issues reopened #16052 Brief reason for revert We started with mltony creating: #16051 Feature request: Sound split Which was a duplicate of: #12985 Audio settings with stereo headset (or speakers) - Send NVDA sounds on one side and the rest of Windows sounds on the other side And then implemented by: #16071 Sound split mltony also created: #16052 Feature request: add command to adjust volume of all applications except for NVDA Which was implemented in: #16273 Keystrokes to adjust applications volume and mute This PR was approved and merged and was then found to cause issues: #16402 Unmuting other apps does not work as expected #16409 Apps mute and volume features work very unexpectedly with WASAPI disabled Due to these issues and the considerable debate on the approach, the above PR #16273 was reverted by: #16440 As an alternative to the revert #16440 to resolve the 2 issues (#16402, #16409) and keep #16273, mltony created: #16404 The question now becomes, how do we proceed from here? NV Access's position is that the sound split functionality (#16051) is a useful feature to add into core. However, due to the following reasons, we believe that further work on the volume adjustment features (#16273, #16404) to improve the UX is required on a branch (off master/alpha) before it can be added back in: Windows sound mixer has reasonable accessibility. Sound split on its own provides value to users. The UX of swapping between NVDA volume control and windows volume control needs to be resolved. The UX of resolving volume issues due to NVDA crashes needs to be resolved. As one of the contributors on the threads said, "So now there are two mixers in the chain, one of which can be invisible, and overrides the other, or makes its settings relative instead of absolute."
Closes #16052. Please note that this is my second attempt to implement this. The first attempt was #16273 which was reverted in #16440# by commit f63841f. Summary of the issue: Provide a way to adjust volume of other applications, so that when using sound split the volume of aplications channel can be adjusted separately from NVDA volume. Description of user facing changes New keystrokes: NVDA+alt+pageUp/pageDown adjusts volume of all other applications. NVDA+alt+delete Cycles between three states Disabled (default) Enabled Muted - all applications except NVDA will be muted Description of development approach I refactored sound split code. Sound split and applications volume adjustment need to use same callbacks in a similar fashion. In order to reduce code reduplication, I extracted common logic and put it in audio/utils.py. Now it provides an abstract class AudioSessionCallback and customers (sound split and app volume adjuster) are implementing this class. Two methods that need to be implemented are onSessionUpdate and onSessionTerminated, which operate on a single audio session. All the plumbing is hidden in utils.py so that clients don't need to worry about setting up and dealing with multiple lower-level callbacks. Applications' voluem adjusting logic is implemented in audio/appsVolume.py and is quite straightforward now. Volume and mute status are adjusted via ISimpleAudioVolume interface, which means that both are reflected in Windows Volume Mixer. 4.Initial volume and mute status of applications is storedand upon exit will be restored. Applciation volume adjustment is now completely independent of sound split and both features can operate independently of each other.
Link to issue number:
Closes #16052.
Summary of the issue:
Needd commands to adjust volume of all applications other than NVDA.
Description of user facing changes
Adding commands to adjust volume of all applications other than NVDA bound to
nvda+alt+pageUp/pageDown
.Also adding a command to mute all applications other than NVDA bound to
nvda+alt+delete
.Also adding corresponding settings to audio panel.
Description of development approach
Making use of sound split code - we already have code to set volume of all other apps, but it's only used to mute left or right channel. Reusing same code to adjust volume as well.
Testing strategy:
Tested manually.
Known issues with pull request:
N/A
Code Review Checklist: