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

Re-add audio device combo box to synth select dialog #15486

Merged
merged 11 commits into from Sep 25, 2023

Conversation

codeofdusk
Copy link
Contributor

@codeofdusk codeofdusk commented Sep 20, 2023

Link to issue number:
Partially reverts #15472.

Summary of the issue:

The "output device" option has been removed from the NVDA+Control+s dialog. This breaks muscle memory for long-time NVDA users and makes it very hard to blindly (without audible speech or connected Braille) change sound devices in the event of unexpected device switching.

Description of how this pull request fixes the issue:

Selectively reverts the change in #15472 that removes the option from the synth selection dialog.

Testing strategy:

Verified that the "output device" option in both dialogs works as expected

Known issues with pull request:

  • There is a small amount of code duplication.
  • The same dialog appears when clicking the "change..." button in voice settings and when invoking the gesture, but it doesn't make as much sense for the "audio device" option to appear in the first scenario since it's just as easy to find under audio settings. In a follow-up, consider making the option appear only when accessing the synth change dialog via gesture.

Change log entry:

In PR

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@codeofdusk codeofdusk requested a review from a team as a code owner September 20, 2023 22:46
@codeofdusk codeofdusk changed the base branch from master to beta September 20, 2023 22:46
@AppVeyorBot
Copy link

See test results for failed build of commit 32f11a2d16

@codeofdusk
Copy link
Contributor Author

Some lint errors (especially re string formatting) appear to be false-positives, and this was compliant as originally present.

@cary-rowen
Copy link
Contributor

This breaks muscle memory for long-time NVDA users and makes it very hard to blindly (without audible speech or connected Braille) change sound devices in the event of unexpected device switching.

Regarding the second concern you mentioned, I think implementing #8801 may be a long-term solution.

As for what you mentioned about destroying muscle memory, I think it is not the most important, because it will not lead to any terrible consequences.

@codeofdusk
Copy link
Contributor Author

Regarding the second concern you mentioned, I think implementing #8801 may be a long-term solution.

Yes, though likely not in 2023.3. Worth considering for 2024.1!

@cary-rowen
Copy link
Contributor

#15472 was also a change introduced during the beta cycle. What does NV Access think about this?
cc @seanbudd

source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
@seanbudd seanbudd marked this pull request as draft September 21, 2023 03:28
@seanbudd
Copy link
Member

Regarding the second concern you mentioned, I think implementing #8801 may be a long-term solution.

Yes, though likely not in 2023.3. Worth considering for 2024.1!

agreed, the beta period is for completing work and fixing regressions not new features.
#15472 is the completion of WASAPI work that now appears stable and has had alpha and limited beta testing.

@codeofdusk codeofdusk force-pushed the readd-audio-device-to-synth-dialog branch from 44f18c0 to b85837d Compare September 21, 2023 04:43
@codeofdusk codeofdusk force-pushed the readd-audio-device-to-synth-dialog branch from b85837d to 4aef139 Compare September 21, 2023 04:46
@codeofdusk codeofdusk marked this pull request as ready for review September 21, 2023 04:53
@@ -2566,6 +2572,38 @@ def _synthWarningDialog(newSynth: str):
)


def _addAudioCombos(panel, sHelper):
Copy link
Member

Choose a reason for hiding this comment

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

can this please get type hints?
Perhaps this could be a static method of AudioPanel, so that when the deprecated code is removed the function still makes sense as a helper function

Copy link
Member

Choose a reason for hiding this comment

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

any thoughts on making this a static method? it will greatly simplify the diff and also simplify reverting in 2024.1

source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
user_docs/en/changes.t2t Outdated Show resolved Hide resolved
@Adriani90
Copy link
Collaborator

I think if the audio settings category will have a shortcut as well or am I wrong?
To be honnest, if the user guide and the change log document properly that the audio settings category contains this setting, then there is no reason why long term users should not get used to it.
Long term nvda users will certainly be able to adapt this change in the day to day use as long as the documentation is clear about this.change.
In my view this setting suits better in the audio settings category but maybe I don‘t understand completely the issue here.

@LeonarddeR
Copy link
Collaborator

I'm not sure about this proposal. I really like a separate settings category, as long as it has a dedicated shortcut to open. In that case, audio output device would be the first item in the dialog and it would instantly gain focus, which is an improvement over the current sequence. That definitely needs to be added regardless of what happens with this pr.
Furthermore, since I introduced RD Access, I always found it a bit weird that the audio device combobox was situated in the synthesizer selection dialog since a synthesizer doesn't necessarily need an audio device locally.

However, I'm also slightly concerned that removing the audio device selection from the synthesizer dialog causes unexpected behavioral changes in case where NVDA is somehow stuck to a nonexistent sound device. In the past, changing synth would also reinitialize audio in this case since the selected device would automatically fall back to sound mapper, but now, this no longer happens.

@CyrilleB79
Copy link
Collaborator

Agree with @LeonarddeR and @Adriani90: A shortcut to open audio settings could be added for the audio panel and the audio device would be the first item, directly focused. @codeofdusk, could you explain if and why this solution is not satisfying?

IMO the fact that people are used to NVDA+control+S then tab to blindly change their audio device is not a good reason to revert. Things may be changed provided that they are well documented in User Guide and in the Change log; an article in In-process could also be worth it if needed (Cc @Qchristensen)

However, I'm also slightly concerned that removing the audio device selection from the synthesizer dialog causes unexpected behavioral changes in case where NVDA is somehow stuck to a nonexistent sound device. In the past, changing synth would also reinitialize audio in this case since the selected device would automatically fall back to sound mapper, but now, this no longer happens.

@LeonarddeR could you please be more specific: use case description in detail and step to recover from non-existing sound device situation?

@LeonarddeR
Copy link
Collaborator

@LeonarddeR could you please be more specific: use case description in detail and step to recover from non-existing sound device situation?

I must admit that this is slightly hypothetical, and I need to test it to gain some proof, but up until now, synthesizer and audio device selection have been that intertwined that there is likely a interdependence that we might be missing. It is not without reason that the audio device is part of the speech category in the config spec.
I'm not saying we shouldn't move the audio device to a dedicated audio setting. However given we're already at beta 2, introducing a change like this in beta 3 concerns me. I'd rather see this ripen in Alpha for a while.

@codeofdusk
Copy link
Contributor Author

@codeofdusk, could you explain if and why this solution is not satisfying?

The solution is satisfying, but given the length of time for which we've had audio devices in NVDA+Control+s (well over 10 years) announcing a change like this (especially given the possibility of unforseen interdependence pointed out by @LeonarddeR) with very little warning presents a poor user experience. Target the change for 2024.1 and use the intervening time to warn users/think of a good UX for this.

@Adriani90
Copy link
Collaborator

Target the change for 2024.1 and use the intervening time to warn users/think of a good UX for this.

This sounds like a reasonable request.

@seanbudd seanbudd added this to the 2023.3 milestone Sep 22, 2023
@seanbudd
Copy link
Member

I must admit that this is slightly hypothetical, and I need to test it to gain some proof, but up until now, synthesizer and audio device selection have been that intertwined that there is likely a interdependence that we might be missing. It is not without reason that the audio device is part of the speech category in the config spec.

@LeonarddeR, please check the code changes in #15472.
We perform the same reinitialization of the synthesizer and tones when changing the audio output device from the audio panel. As long as the onOk/onSave handling matches correctly there shouldn't be an issue.

@LeonarddeR
Copy link
Collaborator

I think I'm convinced now. I just tried the following:

  1. Set audio device to a specific soundcard
  2. Disconnect that soundcard.
  3. Select another synth.

The new synth happily ignores the configured nonexistent device and chooses the sound mapper. This is great.

seanbudd
seanbudd previously approved these changes Sep 22, 2023
source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
@AppVeyorBot
Copy link

See test results for failed build of commit 52966abcc1

@AppVeyorBot
Copy link

See test results for failed build of commit af7e582700

@seanbudd
Copy link
Member

@codeofdusk - there is no need to bump CI. If the failures are unrelated they can be ignored

@seanbudd seanbudd merged commit e4ae771 into nvaccess:beta Sep 25, 2023
1 check was pending
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Sep 25, 2023
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Sep 25, 2023
seanbudd pushed a commit that referenced this pull request Sep 26, 2023
…4.1 (#15512)

#15486 was intended only for the 2023.3 release. Remove it in 2024.1.

Closes #15516.

This reverts commit e4ae771.
@CyrilleB79 CyrilleB79 mentioned this pull request Nov 9, 2023
5 tasks
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.

None yet

7 participants