From 5ce0e6416e9e821be69219cc8a949c00e2cb462c Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Fri, 24 Dec 2021 21:05:01 +0100 Subject: Fix animation freeze when loading music files (#609) * Implement async music loading * Simplify music filename parsing and fix "missing" on streams Co-authored-by: oldmud0 --- include/aomusicplayer.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/aomusicplayer.h') diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index f899b9a..7c9bfb3 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -10,6 +10,8 @@ #include #include #include +#include +#include class AOMusicPlayer { public: @@ -24,8 +26,10 @@ public: int loop_start[4] = {0, 0, 0, 0}; int loop_end[4] = {0, 0, 0, 0}; + QFutureWatcher music_watcher; + public slots: - int play(QString p_song, int channel = 0, bool loop = false, + QString play(QString p_song, int channel = 0, bool loop = false, int effect_flags = 0); void stop(int channel = 0); -- cgit