From dd3b8cbf8ef76065e026646fc89469296270d12c Mon Sep 17 00:00:00 2001 From: Sander Land <48946947+sanderland@users.noreply.github.com> Date: Sun, 4 Jul 2021 16:50:02 +0200 Subject: [PATCH] mac sounds fix 1.9.3 (#455) * edit katrain/gui/sound.py, edit katrain/core/constants.py * edit katrain/gui/sound.py Co-authored-by: Sander Land --- katrain/core/constants.py | 2 +- katrain/gui/sound.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/katrain/core/constants.py b/katrain/core/constants.py index 67d4693b..cd52c015 100644 --- a/katrain/core/constants.py +++ b/katrain/core/constants.py @@ -1,5 +1,5 @@ PROGRAM_NAME = "KaTrain" -VERSION = "1.9.2" +VERSION = "1.9.3" HOMEPAGE = "https://github.com/sanderland/katrain" CONFIG_MIN_VERSION = "1.9.0" # keep config files from this version ANALYSIS_FORMAT_VERSION = "1.0" diff --git a/katrain/gui/sound.py b/katrain/gui/sound.py index 0d857b8f..94ad626f 100644 --- a/katrain/gui/sound.py +++ b/katrain/gui/sound.py @@ -6,8 +6,7 @@ cached_sounds = {} # prefer ffpyplayer on linux, then others, avoid gst and avoid or ffpyplayer on windows -ranking = [("ffpy", 98 if platform == "win" else -2), ("sdl", -1), ("gst", 99), ("", 0)] - +ranking = [("ffpy", 98 if platform in ["win",'macosx'] else -2), ("sdl", -1), ("gst", 99), ("", 0)] try: SoundLoader._classes.sort(key=lambda cls: [v for k, v in ranking if k in cls.__name__.lower()][0]) except Exception as e: