From 80d58728d503c9f908bee8aeb01813590fff13f7 Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 6 Dec 2023 04:45:33 +0300 Subject: [PATCH] Fix TTS not working properly with auto advance (#2874) * Fix TTS not working properly with auto advance * Restore cb() call in error path (dae) --- qt/aqt/tts.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/qt/aqt/tts.py b/qt/aqt/tts.py index 533359229..f80bcf6bd 100644 --- a/qt/aqt/tts.py +++ b/qt/aqt/tts.py @@ -257,11 +257,9 @@ class MacTTSFilePlayer(MacTTSPlayer): # inject file into the top of the audio queue from aqt.sound import av_player + av_player.current_player = None av_player.insert_file(self.tmppath) - # then tell player to advance, which will cause the file to be played - cb() - # Windows support ########################################################################## @@ -612,7 +610,5 @@ if is_win: # inject file into the top of the audio queue from aqt.sound import av_player + av_player.current_player = None av_player.insert_file(self.tmppath) - - # then tell player to advance, which will cause the file to be played - cb()