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:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user