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 <sander.land@futurefacts.nl>
This commit is contained in:
Sander LandandSander Land authored and GitHub committed 2021-07-04 16:50:02 +02:00
1 parent fd1af432e5
commit dd3b8cbf8e
2 files changed
+2 -3

No files matched your search

+1 -2
View File
@@ -6,8 +6,7 @@ from kivy.utils import platform
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: