Update src/aomusicplayer.cpp

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
This commit is contained in:
Crystalwarrior 2021-01-27 20:20:26 +03:00 committed by GitHub
parent b394eb84fa
commit 0041352b18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ void AOMusicPlayer::play(QString p_song, int channel, bool loop,
BASS_ChannelLock(oldstream, false); BASS_ChannelLock(oldstream, false);
} }
if (effect_flags & FADE_OUT) { if ((effect_flags & FADE_OUT) && m_volume[channel] > 0) {
// Fade out the other sample and stop it (due to -1) // Fade out the other sample and stop it (due to -1)
BASS_ChannelSlideAttribute(oldstream, BASS_ATTRIB_VOL | BASS_SLIDE_LOG, BASS_ChannelSlideAttribute(oldstream, BASS_ATTRIB_VOL | BASS_SLIDE_LOG,
-1, 4000); -1, 4000);