diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2021-01-24 04:25:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-24 04:25:42 +0300 |
| commit | b394eb84fac370c89fdba551369234d7da68ac1c (patch) | |
| tree | feb04454328f91d03de34823f4a2ba328e39b949 /src/aomusicplayer.cpp | |
| parent | c13e6b7ab0fd36ebf784294b2788ae365109a24f (diff) | |
Revert "fix music fading being audible when volume is 0 (#416)"
This reverts commit 75c1df5312d36eabee68822bd5830777fe00ec03.
Diffstat (limited to 'src/aomusicplayer.cpp')
| -rw-r--r-- | src/aomusicplayer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/aomusicplayer.cpp b/src/aomusicplayer.cpp index b36de486..e090375a 100644 --- a/src/aomusicplayer.cpp +++ b/src/aomusicplayer.cpp @@ -96,7 +96,7 @@ void AOMusicPlayer::play(QString p_song, int channel, bool loop, BASS_ChannelLock(oldstream, false); } - if (effect_flags & FADE_OUT & (m_volume[channel] != 0)) { + if (effect_flags & FADE_OUT) { // Fade out the other sample and stop it (due to -1) BASS_ChannelSlideAttribute(oldstream, BASS_ATTRIB_VOL | BASS_SLIDE_LOG, -1, 4000); @@ -116,7 +116,6 @@ void AOMusicPlayer::play(QString p_song, int channel, bool loop, BASS_ChannelSlideAttribute(newstream, BASS_ATTRIB_VOL, static_cast<float>(m_volume[channel] / 100.0f), 1000); - } else this->set_volume(m_volume[channel], channel); @@ -158,7 +157,6 @@ void CALLBACK loopProc(HSYNC handle, DWORD channel, DWORD data, void *user) BASS_ChannelLock(channel, false); } - void AOMusicPlayer::set_looping(bool toggle, int channel) { m_looping = toggle; |
