From f9385572df4a7cd1d0ab3f5ea2640d12866f0263 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 17 Dec 2016 13:47:07 +1000 Subject: [PATCH] fix audio not stopping or overlapping make sure we always send bytes --- anki/sound.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anki/sound.py b/anki/sound.py index d0382e27e..e85eec94e 100644 --- a/anki/sound.py +++ b/anki/sound.py @@ -104,7 +104,7 @@ class MplayerMonitor(threading.Thread): # clearing queue? if mplayerClear and self.mplayer: try: - self.mplayer.stdin.write("stop\n") + self.mplayer.stdin.write(b"stop\n") self.mplayer.stdin.flush() except: # mplayer quit by user (likely video) @@ -153,7 +153,7 @@ class MplayerMonitor(threading.Thread): if not self.mplayer: return try: - self.mplayer.stdin.write("quit\n") + self.mplayer.stdin.write(b"quit\n") self.mplayer.stdin.flush() self.deadPlayers.append(self.mplayer) except: