Sound should now stop when speech stops. This means no more interrupting speech just to have the link sounds on a page continue to play.

This commit is contained in:
Storm Dragon
2026-05-08 01:02:57 -04:00
parent e54600ff4d
commit 6f33caade1
4 changed files with 57 additions and 1 deletions
+4
View File
@@ -128,6 +128,10 @@ class Player:
def stop(self, _element: Any = None) -> None:
"""Stops current sound playback."""
with self._workerLock:
if self._workerProcess is None or self._workerProcess.poll() is not None:
return
self._sendWorkerCommand({"action": "stop"}, waitForResponse=False)
def shutdown(self) -> None:
+2
View File
@@ -694,6 +694,8 @@ def stop() -> None:
_speechserver.stop() # type: ignore
if _echoSpeechserver and _echoSpeechserver != _speechserver:
_echoSpeechserver.stop() # type: ignore
player = sound.getPlayer()
player.stop()
def shutdown() -> None:
debug.printMessage(debug.LEVEL_INFO, 'SPEECH: Shutting down', True)