diff options
Diffstat (limited to 'src/frontend/qt_sdl/AudioSettingsDialog.cpp')
-rw-r--r-- | src/frontend/qt_sdl/AudioSettingsDialog.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/AudioSettingsDialog.cpp b/src/frontend/qt_sdl/AudioSettingsDialog.cpp index f47a62a..5ac178a 100644 --- a/src/frontend/qt_sdl/AudioSettingsDialog.cpp +++ b/src/frontend/qt_sdl/AudioSettingsDialog.cpp @@ -38,8 +38,15 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent) : QDialog(parent), ui( ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); + oldInterp = Config::AudioInterp; oldVolume = Config::AudioVolume; + ui->cbInterpolation->addItem("None"); + ui->cbInterpolation->addItem("Linear"); + ui->cbInterpolation->addItem("Cosine"); + ui->cbInterpolation->addItem("Cubic"); + ui->cbInterpolation->setCurrentIndex(Config::AudioInterp); + ui->slVolume->setValue(Config::AudioVolume); grpMicMode = new QButtonGroup(this); @@ -73,11 +80,22 @@ void AudioSettingsDialog::on_AudioSettingsDialog_accepted() void AudioSettingsDialog::on_AudioSettingsDialog_rejected() { + Config::AudioInterp = oldInterp; Config::AudioVolume = oldVolume; closeDlg(); } +void AudioSettingsDialog::on_cbInterpolation_currentIndexChanged(int idx) +{ + // prevent a spurious change + if (ui->cbInterpolation->count() < 4) return; + + Config::AudioInterp = ui->cbInterpolation->currentIndex(); + + emit updateAudioSettings(); +} + void AudioSettingsDialog::on_slVolume_valueChanged(int val) { Config::AudioVolume = val; |