From 1c670a98032f7863aa06ff0fdd1a6493dc33dbd7 Mon Sep 17 00:00:00 2001 From: VisualPlugin Date: Wed, 27 Nov 2024 04:12:25 +0000 Subject: [PATCH 1/2] Update core-windows.py --- core/core-windows.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/core-windows.py b/core/core-windows.py index 692659e..95c154e 100644 --- a/core/core-windows.py +++ b/core/core-windows.py @@ -61,7 +61,13 @@ def set_voice(self, value): # By setting the audio device after changing voices seems to fix this # This was noted from information at: # http://lists.nvaccess.org/pipermail/nvda-dev/2011-November/022464.html - self.object.AudioOutput = self.object.AudioOutput + + # Likewise, if this routine is not changed, then the pitch will sound higher than it should be. + # https://www.autohotkey.com/boards/viewtopic.php?t=33651#p232026 + self.object.AllowAudioOutputFormatChangesOnNextSet = 0 + self.object.AudioOutputStream.Format.Type = 39 # SAFT48kHz16BitStereo + self.object.AudioOutputStream = self.object.AudioOutputStream + self.object.AllowAudioOutputFormatChangesOnNextSet = 1 def get_pitch(self): return self._pitch From 7854bf36c0e76747930cfd6e43323af6deeb07cc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 04:14:49 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- core/core-windows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-windows.py b/core/core-windows.py index 95c154e..103a918 100644 --- a/core/core-windows.py +++ b/core/core-windows.py @@ -65,7 +65,7 @@ def set_voice(self, value): # Likewise, if this routine is not changed, then the pitch will sound higher than it should be. # https://www.autohotkey.com/boards/viewtopic.php?t=33651#p232026 self.object.AllowAudioOutputFormatChangesOnNextSet = 0 - self.object.AudioOutputStream.Format.Type = 39 # SAFT48kHz16BitStereo + self.object.AudioOutputStream.Format.Type = 39 # SAFT48kHz16BitStereo self.object.AudioOutputStream = self.object.AudioOutputStream self.object.AllowAudioOutputFormatChangesOnNextSet = 1