From 70230a6e615a5263e6e27ca7524f7bb853dc1387 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Fri, 25 Mar 2022 14:31:10 +0300 Subject: [PATCH] for music, stop checking if future was cancelled due to a horrible race condition with an unknown reason why it happens (#700) --- src/aomusicplayer.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/aomusicplayer.cpp b/src/aomusicplayer.cpp index 5d9df79..2b75baa 100644 --- a/src/aomusicplayer.cpp +++ b/src/aomusicplayer.cpp @@ -16,7 +16,6 @@ AOMusicPlayer::~AOMusicPlayer() QString AOMusicPlayer::play(QString p_song, int channel, bool loop, int effect_flags) { - QFuture invoking_future = music_watcher.future(); channel = channel % m_channelmax; if (channel < 0) // wtf? return "[ERROR] Invalid Channel"; @@ -45,13 +44,6 @@ QString AOMusicPlayer::play(QString p_song, int channel, bool loop, int error_code = BASS_ErrorGetCode(); - if (invoking_future.isCanceled()) { - // Target future has changed. This stream has become irrelevant. - // So even if the stream manages to finish after the latest one, we don't run - // into order issues. - return QString(); - } - if (ao_app->get_audio_output_device() != "default") BASS_ChannelSetDevice(m_stream_list[channel], BASS_GetDevice());