Fix TTS not working properly with auto advance (#2874)

* Fix TTS not working properly with auto advance

* Restore cb() call in error path (dae)
This commit is contained in:
Abdo 2023-12-06 04:45:33 +03:00 committed by GitHub
parent 5daafef5e6
commit 80d58728d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,11 +257,9 @@ class MacTTSFilePlayer(MacTTSPlayer):
# inject file into the top of the audio queue # inject file into the top of the audio queue
from aqt.sound import av_player from aqt.sound import av_player
av_player.current_player = None
av_player.insert_file(self.tmppath) av_player.insert_file(self.tmppath)
# then tell player to advance, which will cause the file to be played
cb()
# Windows support # Windows support
########################################################################## ##########################################################################
@ -612,7 +610,5 @@ if is_win:
# inject file into the top of the audio queue # inject file into the top of the audio queue
from aqt.sound import av_player from aqt.sound import av_player
av_player.current_player = None
av_player.insert_file(self.tmppath) av_player.insert_file(self.tmppath)
# then tell player to advance, which will cause the file to be played
cb()