Skip to content

Commit

Permalink
Revert "Re-add audio device combo box to synth select dialog (#15486)"
Browse files Browse the repository at this point in the history
This reverts commit e4ae771.
  • Loading branch information
codeofdusk committed Sep 25, 2023
1 parent e4ae771 commit 48aa313
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 21 deletions.
2 changes: 1 addition & 1 deletion miscDeps
31 changes: 11 additions & 20 deletions source/gui/settingsDialogs.py
Expand Up @@ -18,7 +18,6 @@
import typing
import wx
from NVDAState import WritePaths
from buildVersion import version_year

from vision.providerBase import VisionEnhancementProviderSettings
from wx.lib.expando import ExpandoTextCtrl
Expand Down Expand Up @@ -1109,8 +1108,6 @@ def makeSettings(self, settingsSizer):
self.synthList = settingsSizerHelper.addLabeledControl(synthListLabelText, wx.Choice, choices=[])
self.bindHelpEvent("SelectSynthesizerSynthesizer", self.synthList)
self.updateSynthesizerList()
if version_year < 2024:
AudioPanel._addAudioCombos(self, settingsSizerHelper)

def postInit(self):
# Finally, ensure that focus is on the synthlist
Expand All @@ -1133,8 +1130,6 @@ def onOk(self, evt):
# The list of synths has not been populated yet, so we didn't change anything in this panel
return

config.conf["speech"]["outputDevice"] = self.deviceList.GetStringSelection()

newSynth = self.synthNames[self.synthList.GetSelection()]
if not setSynth(newSynth):
_synthWarningDialog(newSynth)
Expand Down Expand Up @@ -2586,41 +2581,37 @@ class AudioPanel(SettingsPanel):
title = _("Audio")
helpId = "AudioSettings"

@staticmethod
def _addAudioCombos(panel: SettingsPanel, sHelper: guiHelper.BoxSizerHelper):
# Translators: This is the label for the select output device combo in NVDA audio settings.
def makeSettings(self, settingsSizer: wx.BoxSizer) -> None:
sHelper = guiHelper.BoxSizerHelper(self, sizer=settingsSizer)

# Translators: This is the label for the select output device combo in the synthesizer dialog.
# Examples of an output device are default soundcard, usb headphones, etc.
deviceListLabelText = _("Audio output &device:")
deviceNames = nvwave.getOutputDeviceNames()
# #11349: On Windows 10 20H1 and 20H2, Microsoft Sound Mapper returns an empty string.
if deviceNames[0] in ("", "Microsoft Sound Mapper"):
# Translators: name for default (Microsoft Sound Mapper) audio output device.
deviceNames[0] = _("Microsoft Sound Mapper")
panel.deviceList = sHelper.addLabeledControl(deviceListLabelText, wx.Choice, choices=deviceNames)
panel.bindHelpEvent("SelectSynthesizerOutputDevice", panel.deviceList)
self.deviceList = sHelper.addLabeledControl(deviceListLabelText, wx.Choice, choices=deviceNames)
self.bindHelpEvent("SelectSynthesizerOutputDevice", self.deviceList)
try:
selection = deviceNames.index(config.conf["speech"]["outputDevice"])
except ValueError:
selection = 0
panel.deviceList.SetSelection(selection)
self.deviceList.SetSelection(selection)

# Translators: This is a label for the audio ducking combo box in the Audio Settings dialog.
duckingListLabelText = _("Audio d&ucking mode:")
panel.duckingList = sHelper.addLabeledControl(
self.duckingList = sHelper.addLabeledControl(
duckingListLabelText,
wx.Choice,
choices=[mode.displayString for mode in audioDucking.AudioDuckingMode]
)
panel.bindHelpEvent("SelectSynthesizerDuckingMode", panel.duckingList)
self.bindHelpEvent("SelectSynthesizerDuckingMode", self.duckingList)
index = config.conf["audio"]["audioDuckingMode"]
panel.duckingList.SetSelection(index)
self.duckingList.SetSelection(index)
if not audioDucking.isAudioDuckingSupported():
panel.duckingList.Disable()

def makeSettings(self, settingsSizer: wx.BoxSizer) -> None:
sHelper = guiHelper.BoxSizerHelper(self, sizer=settingsSizer)

AudioPanel._addAudioCombos(self, sHelper)
self.duckingList.Disable()

# Translators: This is the label for a checkbox control in the
# Audio settings panel.
Expand Down
42 changes: 42 additions & 0 deletions user_docs/en/changes.t2t
Expand Up @@ -4,6 +4,48 @@ What's New in NVDA
%!includeconf: ../changes.t2tconf
%!includeconf: ./locale.t2tconf

= 2024.1 =

== New Features ==
- Added support for Bluetooth Low Energy HID Braille displays. (#15470)
-


== Changes ==


== Bug Fixes ==
- Reporting of object shortcut keys has been improved. (#10807)
- The SAPI4 synthesizer now properly supports volume, rate and pitch changes embedded in speech. (#15271)
-

== Changes for Developers ==
Please refer to [the developer guide https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#API] for information on NVDA's API deprecation and removal process.

- Note: this is an Add-on API compatibility breaking release.
Add-ons will need to be re-tested and have their manifest updated.
- Added extension point: ``treeInterceptorHandler.post_browseModeStateChange``. (#14969)
-

=== API Breaking Changes ===
These are breaking API changes.
Please open a GitHub issue if your Add-on has an issue with updating to the new API.

- ``IAccessibleHandler.SecureDesktopNVDAObject`` has been removed.
Instead, when NVDA is running on the user profile, track the existence of the secure desktop with the extension point: ``winAPI.secureDesktop.post_secureDesktopStateChange``. (#14488)
- ``braille.BrailleHandler.handlePendingCaretUpdate`` has been removed with no public replacement. (#15163)
- ``bdDetect.addUsbDevices and bdDetect.addBluetoothDevices`` have been removed.
Braille display drivers should implement the ``registerAutomaticDetection`` ``classmethod`` instead.
That method receives a ``DriverRegistrar`` object on which the ``addUsbDevices`` and ``addBluetoothDevices`` methods can be used. (#15200)
- The default implementation of the check method on ``BrailleDisplayDriver`` now requires both the ``threadSafe`` and ``supportsAutomaticDetection`` attributes to be set to ``True``. (#15200)
- Passing lambda functions to ``hwIo.ioThread.IoThread.queueAsApc`` is no longer possible, as functions should be weakly referenceable. (#14627)
- ``IoThread.autoDeleteApcReference`` has been removed. (#14924)
- To support capital pitch changes, synthesizers must now explicitly declare their support for the ``PitchCommand`` in the ``supportedCommands`` attribute on the driver. (#15433)
-

=== Deprecations ===


= 2023.3 =
This release includes improvements to performance, responsiveness and stability of audio output.
Options have been added to control the volume of NVDA sounds and beeps, or to have them follow the volume of the voice you are using.
Expand Down

0 comments on commit 48aa313

Please sign in to comment.