From 44a4a2d23ede7986212558e9cc53387d6f3a1dc9 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sat, 4 Jul 2020 20:15:52 +0300 Subject: Fix an issue where the Ambience layer would break looping points for all other channels due to loop_start and loop_end only being a single variable. (#164) This occurs due to BASS not having any private variables of its own, so it was simply using the public variables loop_start and loop_end as reference - since those changed for any new song playing on another channel, the old looping points got replaced, and the seamless looping stops working. The solution was easy - just make a loop_start/loop_end variable for every supported channel - so 4 variables in our case. --- include/aomusicplayer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index de673e5e..82751b68 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -25,8 +25,8 @@ public: const int m_channelmax = 4; // These have to be public for the stupid sync thing - int loop_start = 0; - int loop_end = 0; + int loop_start[4] = {0, 0, 0, 0}; + int loop_end[4] = {0, 0, 0, 0}; public slots: void play(QString p_song, int channel = 0, bool loop = false, -- cgit