diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2020-07-04 20:15:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-04 12:15:52 -0500 |
| commit | 44a4a2d23ede7986212558e9cc53387d6f3a1dc9 (patch) | |
| tree | 67d0533bed7878294f914120b06a543fa9bdd64c /include | |
| parent | c533370fd8a939721af41e566fc28c854d616b09 (diff) | |
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.
Diffstat (limited to 'include')
| -rw-r--r-- | include/aomusicplayer.h | 4 |
1 files changed, 2 insertions, 2 deletions
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, |
