Skip to content

Commit f40a7dc

Browse files
authored
Always re-enable audio ducking when starting a new utterance (#17770)
#17747. Does not fix it completely, but makes it better. Summary of the issue: When audio ducking is set to always duck, starting Magnifier overrides the audio ducking behavior, until the user changes the NVDA setting again. Description of user facing changes NVDA will now change the audio ducking behavior back to "always duck" each time a new utterance is started. Although Magnifier can still cancel audio ducking when it's started, NVDA will fix this next time it starts an utterance. Description of development approach Made _setDuckingState(True) always executed regardless of the current ref count.
1 parent dfc671f commit f40a7dc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

source/audioDucking.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ def _ensureDucked():
111111
_duckingRefCount += 1
112112
if _isDebug():
113113
log.debug("Increased ref count, _duckingRefCount=%d" % _duckingRefCount)
114-
if _duckingRefCount == 1 and _audioDuckingMode != AudioDuckingMode.NONE:
114+
if _audioDuckingMode != AudioDuckingMode.NONE:
115115
_setDuckingState(True)
116+
if _duckingRefCount == 1 and _audioDuckingMode != AudioDuckingMode.NONE:
116117
delta = 0
117118
else:
118119
delta = time.time() - _lastDuckedTime

user_docs/en/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ In any document, if the cursor is on the last line, it will be moved to the end
129129
* The NVDA Highlighter Window icon is no longer fixed in the taskbar after restarting Explorer. (#17696, @hwf1324)
130130
* Fixed an issue where some SAPI4 voices (e.g. IBM TTS Chinese) cannot be loaded. (#17726, @gexgd0419)
131131
* In Excel, the element list dialog (`NVDA+f7`) no longer fails to list comment or formulas on some non-English systems. (#11366, @CyrilleB79)
132+
* NVDA can now restore the audio ducking behavior when speaking a new utterance, when another app such as Magnifier changes the behavior system-wide. (#17747, @gexgd0419)
132133

133134
### Changes for Developers
134135

0 commit comments

Comments
 (0)