Skip to content
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

Feature request: Sound split #16051

Closed
mltony opened this issue Jan 16, 2024 · 2 comments
Closed

Feature request: Sound split #16051

mltony opened this issue Jan 16, 2024 · 2 comments

Comments

@mltony
Copy link
Contributor

mltony commented Jan 16, 2024

I propose to add sound split command to NVDA. As usual, I will implement this myself if approved.

Description

  • NVDA+Alt+S would toggle sound split. In sound split mode NVDA speech and beeps will be heard in one channel (say left), while sounds from all other applications will be heard in the other channel (right).
  • I will also add a checkbox setting in Audio panel to allow users to toggle sound split from settings dialog.
  • I will also add a new setting in Audio panel to allow users to select which channel NVDA will be redirected to and which channel will be for all other apps

Prior context.

@CyrilleB79 pointed out that this is a duplicate of #12985, but I would like to check that my implementation plan is OK with NVAccess before implementing this.
Prior discussion: #16037

Technical details

Two things I'd like NVAccess to be aware of:

  1. Sound Splitting can be achieved using wasapi by adjusting the volume of all running applications and setting left volume to zero, while setting NVDA right volume to zero (or vice versa). So I will need to call wasapi COM objects. I would need to implement interfaces in Python for these objects. I am not very familiar with Python interoperability with COM, and I haven't found a way to automatically generate Python stubs for COM interfaces, so I propose to copy relevant interfaces from PyCaw library. The library is published under a permissive MIT license and based on Google v. Oracle case a couple of years ago - APIs are not copyrightable. An alternative solution could be including PyCaw library as a dependency, but I personally think this would be an overkill.
  2. In order for sound split to work properly, we would need to monitor audio sessions and if new audio sessions appear, we'd need to adjust their volume. I propose to create a new thread for that. The thread would be checking all audio sessions every second and adjust volume of new ones.
@CyrilleB79
Copy link
Collaborator

Asking NV Access guys (CCing them) for a design confirmation before implementing would have been totally suitable in #12985 and there was no point in opening a new identical issue.

Anyway, now that it's open, I'll let them decide if they want to close this one or #12985.
Cc @seanbudd

You may also decide to report yourself all the explanations that are here in #12985 and close this issue. It's up to you.

@Adriani90
Copy link
Collaborator

I would rather close this one and quote Tony's point as a comment in that issue. There are many skilled people from the community already cced so they will be aware of this. Let's continue the discussion there.

seanbudd added a commit that referenced this issue May 10, 2024
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."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants