Merge pull request #432 from AttorneyOnline/revert-416-fix/ghost-music-fade
Fix music fading being completely broken
This commit is contained in:
		
						commit
						9c6e703bfc
					
				@ -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 & (m_volume[channel] != 0)) {
 | 
					    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);
 | 
				
			||||||
@ -116,7 +116,6 @@ void AOMusicPlayer::play(QString p_song, int channel, bool loop,
 | 
				
			|||||||
    BASS_ChannelSlideAttribute(newstream, BASS_ATTRIB_VOL,
 | 
					    BASS_ChannelSlideAttribute(newstream, BASS_ATTRIB_VOL,
 | 
				
			||||||
                               static_cast<float>(m_volume[channel] / 100.0f),
 | 
					                               static_cast<float>(m_volume[channel] / 100.0f),
 | 
				
			||||||
                               1000);
 | 
					                               1000);
 | 
				
			||||||
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    this->set_volume(m_volume[channel], channel);
 | 
					    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);
 | 
					  BASS_ChannelLock(channel, false);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void AOMusicPlayer::set_looping(bool toggle, int channel)
 | 
					void AOMusicPlayer::set_looping(bool toggle, int channel)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  m_looping = toggle;
 | 
					  m_looping = toggle;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user