Mercurial > hg > sonic-visualiser
changeset 2560:cbde01e5c626 smoother-recording
Add record-mono setting
author | Chris Cannam |
---|---|
date | Tue, 16 Jun 2020 17:04:54 +0100 |
parents | ec038862e0e8 |
children | |
files | main/PreferencesDialog.cpp main/PreferencesDialog.h repoint-lock.json repoint-project.json |
diffstat | 4 files changed, 26 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/main/PreferencesDialog.cpp Mon Jun 15 18:22:31 2020 +0100 +++ b/main/PreferencesDialog.cpp Tue Jun 16 17:04:54 2020 +0100 @@ -260,6 +260,12 @@ rebuildDeviceCombos(); m_audioDeviceChanged = false; // the rebuild will have changed this + QCheckBox *recordMono = new QCheckBox; + m_recordMono = prefs->getRecordMono(); + recordMono->setCheckState(m_recordMono ? Qt::Checked : Qt::Unchecked); + connect(recordMono, SIGNAL(stateChanged(int)), + this, SLOT(recordMonoChanged(int))); + QCheckBox *resampleOnLoad = new QCheckBox; m_resampleOnLoad = prefs->getResampleOnLoad(); resampleOnLoad->setCheckState(m_resampleOnLoad ? Qt::Checked : @@ -570,6 +576,11 @@ subgrid->addWidget(m_audioRecordDeviceCombo, row++, 1, 1, 2); subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Record Mono"))), + row, 0); + subgrid->addWidget(recordMono, row++, 1, 1, 1); + + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel ("Use Gapless Mode"))), row, 0); subgrid->addWidget(gaplessMode, row++, 1, 1, 1); @@ -807,6 +818,13 @@ } void +PreferencesDialog::recordMonoChanged(int state) +{ + m_recordMono = (state == Qt::Checked); + m_applyButton->setEnabled(true); +} + +void PreferencesDialog::resampleOnLoadChanged(int state) { m_resampleOnLoad = (state == Qt::Checked); @@ -971,6 +989,7 @@ prefs->setPropertyBoxLayout(Preferences::PropertyBoxLayout (m_propertyLayout)); prefs->setTuningFrequency(m_tuningFrequency); + prefs->setRecordMono(m_recordMono); prefs->setResampleOnLoad(m_resampleOnLoad); prefs->setUseGaplessMode(m_gapless); prefs->setRunPluginsInProcess(m_runPluginsInProcess);
--- a/main/PreferencesDialog.h Mon Jun 15 18:22:31 2020 +0100 +++ b/main/PreferencesDialog.h Tue Jun 16 17:04:54 2020 +0100 @@ -68,6 +68,7 @@ void audioImplementationChanged(int impl); void audioPlaybackDeviceChanged(int device); void audioRecordDeviceChanged(int device); + void recordMonoChanged(int state); void resampleOnLoadChanged(int state); void gaplessModeChanged(int state); void vampProcessSeparationChanged(int state); @@ -125,6 +126,7 @@ int m_audioImplementation; int m_audioPlaybackDevice; int m_audioRecordDevice; + bool m_recordMono; bool m_resampleOnLoad; bool m_gapless; bool m_runPluginsInProcess;
--- a/repoint-lock.json Mon Jun 15 18:22:31 2020 +0100 +++ b/repoint-lock.json Tue Jun 16 17:04:54 2020 +0100 @@ -4,13 +4,13 @@ "pin": "0e32c328b02a" }, "svcore": { - "pin": "2654bf447a84" + "pin": "44dba7cd9ec3" }, "svgui": { - "pin": "bd1a7c84da8c" + "pin": "a6e37c28d762" }, "svapp": { - "pin": "7bded7599874" + "pin": "56a81812c131" }, "checker": { "pin": "e839338d3869"