mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 08:25:47 -04:00
Qt: Fix audio sliders not applying correctly
This commit is contained in:
@ -99,8 +99,7 @@ void AudioSettingsWidget::updateVolumeLabel()
|
||||
void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
|
||||
{
|
||||
m_host_interface->SetIntSettingValue("Audio", "OutputVolume", new_value);
|
||||
if (!m_ui.muted->isChecked() && !QtHostInterface::GetInstance()->IsFastForwardEnabled())
|
||||
m_host_interface->setAudioOutputVolume(new_value, m_ui.fastForwardVolume->value());
|
||||
m_host_interface->setAudioOutputVolume(new_value, m_ui.fastForwardVolume->value());
|
||||
|
||||
updateVolumeLabel();
|
||||
}
|
||||
@ -108,8 +107,7 @@ void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
|
||||
void AudioSettingsWidget::onFastForwardVolumeChanged(int new_value)
|
||||
{
|
||||
m_host_interface->SetIntSettingValue("Audio", "FastForwardVolume", new_value);
|
||||
if (!m_ui.muted->isChecked() && QtHostInterface::GetInstance()->IsFastForwardEnabled())
|
||||
m_host_interface->setAudioOutputVolume(m_ui.volume->value(), new_value);
|
||||
m_host_interface->setAudioOutputVolume(m_ui.volume->value(), new_value);
|
||||
|
||||
updateVolumeLabel();
|
||||
}
|
||||
|
@ -1226,11 +1226,11 @@ void QtHostInterface::setAudioOutputVolume(int volume, int fast_forward_volume)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_audio_stream)
|
||||
m_audio_stream->SetOutputVolume(m_speed_limiter_enabled ? volume : fast_forward_volume);
|
||||
|
||||
g_settings.audio_output_volume = volume;
|
||||
g_settings.audio_fast_forward_volume = fast_forward_volume;
|
||||
|
||||
if (m_audio_stream)
|
||||
m_audio_stream->SetOutputVolume(GetAudioOutputVolume());
|
||||
}
|
||||
|
||||
void QtHostInterface::setAudioOutputMuted(bool muted)
|
||||
@ -1400,7 +1400,7 @@ void QtHostInterface::threadEntryPoint()
|
||||
|
||||
System::UpdatePerformanceCounters();
|
||||
|
||||
if (m_speed_limiter_enabled)
|
||||
if (m_throttler_enabled)
|
||||
System::Throttle();
|
||||
|
||||
m_worker_thread_event_loop->processEvents(QEventLoop::AllEvents);
|
||||
|
Reference in New Issue
Block a user