From b4bc36c4a00f10e161d37d6d928be2dbc6fd7e04 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 12 Oct 2015 05:52:34 -0700 Subject: Reorganize the HRTF group box The three radio buttons are moved to a combo box, which gives a bit more width for the file list contents. --- Alc/mixer_defs.h | 2 +- utils/alsoft-config/mainwindow.cpp | 12 +++-- utils/alsoft-config/mainwindow.ui | 105 ++++++++++++++++--------------------- 3 files changed, 54 insertions(+), 65 deletions(-) diff --git a/Alc/mixer_defs.h b/Alc/mixer_defs.h index 9f3b4a6f..0989cce2 100644 --- a/Alc/mixer_defs.h +++ b/Alc/mixer_defs.h @@ -25,7 +25,7 @@ void MixHrtf_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data, const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate, ALuint BufferSize); void Mix_C(const ALfloat *data, ALuint OutChans, ALfloat (*restrict OutBuffer)[BUFFERSIZE], - struct MixGains *Gains, ALuint Counter, ALuint OutPos, ALuint BufferSize); + struct MixGains *Gains, ALuint Counter, ALuint OutPos, ALuint BufferSize); /* SSE mixers */ void MixHrtf_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data, diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index a79098a4..c01bdb38 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -190,6 +190,8 @@ MainWindow::MainWindow(QWidget *parent) : ui->stereoModeCombo->addItem(stereoModeList[i].name); ui->stereoModeCombo->adjustSize(); + ui->hrtfStateComboBox->adjustSize(); + #if !defined(HAVE_NEON) && !defined(HAVE_SSE) ui->cpuExtDisabledLabel->move(ui->cpuExtDisabledLabel->x(), ui->cpuExtDisabledLabel->y() - 60); #else @@ -433,13 +435,13 @@ void MainWindow::loadConfig(const QString &fname) ui->enableNeonCheckBox->setChecked(!disabledCpuExts.contains("neon", Qt::CaseInsensitive)); if(settings.value("hrtf").toString() == QString()) - ui->hrtfAutoButton->setChecked(true); + ui->hrtfStateComboBox->setCurrentIndex(0); else { if(settings.value("hrtf", true).toBool()) - ui->hrtfForceButton->setChecked(true); + ui->hrtfStateComboBox->setCurrentIndex(1); else - ui->hrtfDisableButton->setChecked(true); + ui->hrtfStateComboBox->setCurrentIndex(2); } QStringList hrtf_tables = settings.value("hrtf_tables").toStringList(); @@ -602,9 +604,9 @@ void MainWindow::saveConfig(const QString &fname) const strlist.append("neon"); settings.setValue("disable-cpu-exts", strlist.join(QChar(','))); - if(ui->hrtfForceButton->isChecked()) + if(ui->hrtfStateComboBox->currentIndex() == 1) settings.setValue("hrtf", "true"); - else if(ui->hrtfDisableButton->isChecked()) + else if(ui->hrtfStateComboBox->currentIndex() == 2) settings.setValue("hrtf", "false"); else settings.setValue("hrtf", QString()); diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui index 05cf1a2e..ec4d12ea 100644 --- a/utils/alsoft-config/mainwindow.ui +++ b/utils/alsoft-config/mainwindow.ui @@ -215,67 +215,13 @@ to stereo output. HRTF (Stereo only) - - - - 20 - 30 - 71 - 21 - - - - Allows applications to request HRTF mixing, or for HRTF -mixing to be enabled when headphones are detected. - - - Auto - - - true - - - - - - 20 - 70 - 71 - 21 - - - - Does not allow HRTF mixing, even when requested. - - - Disable - - - - - - 20 - 50 - 71 - 21 - - - - Attempts to force HRTF mixing, even if applications request not -to do it. This may override the channel configuration and -sample rate. - - - Force - - - 110 + 20 30 - 301 - 141 + 391 + 121 @@ -304,7 +250,7 @@ contain these markers, which will be replaced as needed: - 419 + 420 30 81 25 @@ -325,7 +271,7 @@ contain these markers, which will be replaced as needed: - 419 + 420 60 81 25 @@ -340,6 +286,47 @@ contain these markers, which will be replaced as needed: + + + + 110 + 160 + 161 + 22 + + + + QComboBox::AdjustToContentsOnFirstShow + + + + Application preference + + + + + On + + + + + Off + + + + + + + 30 + 160 + 71 + 21 + + + + HRTF Mode: + + -- cgit v1.2.3