From abf6a9260a18bc5d4e69e9c7b8bce35509ade816 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 28 Feb 2016 20:55:41 -0800 Subject: [PATCH] Add an option to select between UHJ and pair-wise mixing. --- utils/alsoft-config/mainwindow.cpp | 17 +++++++++++ utils/alsoft-config/mainwindow.ui | 48 ++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 81b3a8e8..f072773a 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -269,6 +269,8 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->periodCountSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePeriodCountEdit(int))); connect(ui->periodCountEdit, SIGNAL(editingFinished()), this, SLOT(updatePeriodCountSlider())); + connect(ui->stereoPanningComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton())); + connect(ui->preferredHrtfComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(enableApplyButton())); connect(ui->hrtfStateComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(enableApplyButton())); connect(ui->hrtfAddButton, SIGNAL(clicked()), this, SLOT(addHrtfFile())); @@ -539,6 +541,14 @@ void MainWindow::loadConfig(const QString &fname) updatePeriodCountSlider(); } + QString stereopan = settings.value("stereo-panning").toString(); + if(stereopan == "uhj") + ui->stereoPanningComboBox->setCurrentIndex(1); + else if(stereopan == "paired") + ui->stereoPanningComboBox->setCurrentIndex(2); + else + ui->stereoPanningComboBox->setCurrentIndex(0); + QStringList disabledCpuExts = settings.value("disable-cpu-exts").toStringList(); if(disabledCpuExts.size() == 1) disabledCpuExts = disabledCpuExts[0].split(QChar(',')); @@ -767,6 +777,13 @@ void MainWindow::saveConfig(const QString &fname) const } } + if(ui->stereoPanningComboBox->currentIndex() == 1) + settings.setValue("stereo-panning", "uhj"); + else if(ui->stereoPanningComboBox->currentIndex() == 2) + settings.setValue("stereo-panning", "paired"); + else + settings.remove("stereo-panning"); + QStringList strlist; if(!ui->enableSSECheckBox->isChecked()) strlist.append("sse"); diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui index 3c6629f0..8eb3162c 100644 --- a/utils/alsoft-config/mainwindow.ui +++ b/utils/alsoft-config/mainwindow.ui @@ -428,6 +428,54 @@ frames needed for each mixing update. + + + + 130 + 130 + 131 + 22 + + + + Selects the panning method for non-HRTF stereo +mixing. UHJ creates stereo-compatible two-channel +output, which encodes some surround information. +Pair-Wise uses standard pair-wise panning between +-30 and +30 degrees. The default is UHJ. + + + + Default + + + + + UHJ + + + + + Pair-Wise + + + + + + + 20 + 130 + 101 + 21 + + + + Stereo Panning: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + +