changeset 1379:a264b51728cf 3.0-integration

Add gapless preference to prefs dialog; much work on audio read tests
author Chris Cannam
date Thu, 01 Dec 2016 17:45:41 +0000
parents b805ab287c63
children 9c7e133076e1
files .hgsubstate main/PreferencesDialog.cpp main/PreferencesDialog.h
diffstat 3 files changed, 23 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Wed Nov 30 21:02:24 2016 +0000
+++ b/.hgsubstate	Thu Dec 01 17:45:41 2016 +0000
@@ -4,10 +4,10 @@
 68f8e88d6d76fc4ca074166cb80979ccbfc2b6c9 bqvec
 1eefc20919cd080b684b2bbbc0af7270b8facb54 checker
 3768bdde6fdf866aa63fff5bde8d9fa64a8979ef dataquay
-68ae618c6b0e442d08a71d39217784a08f2a8de3 icons/scalable
+c37b5598a4beb570417716e30aa649c78312169f icons/scalable
 3257ddb6fff110cc88f3ffeaeefa0f29d5eb3b6f piper-cpp
 5f67a29f0fc7f1b908f7cde4866173a7af337862 sv-dependency-builds
 0d5c3abc965812805053cc2b399b6696178a1cd9 svapp
-079e553dc16e5b5586f7b5f967b9765057983544 svcore
+ff9697592bef7abc0f42c363927d5aad41b58c6e svcore
 db90fee630bc756c3c64a6f904b551acb13e000f svgui
 0eebd22a081a824067bf3d5de65326696feab653 vamp-plugin-sdk
--- a/main/PreferencesDialog.cpp	Wed Nov 30 21:02:24 2016 +0000
+++ b/main/PreferencesDialog.cpp	Thu Dec 01 17:45:41 2016 +0000
@@ -224,6 +224,12 @@
     connect(resampleOnLoad, SIGNAL(stateChanged(int)),
             this, SLOT(resampleOnLoadChanged(int)));
 
+    QCheckBox *gaplessMode = new QCheckBox;
+    m_gapless = prefs->getUseGaplessMode();
+    gaplessMode->setCheckState(m_gapless ? Qt::Checked : Qt::Unchecked);
+    connect(gaplessMode, SIGNAL(stateChanged(int)),
+            this, SLOT(gaplessModeChanged(int)));
+
     m_tempDirRootEdit = new QLineEdit;
     QString dir = prefs->getTemporaryDirectoryRoot();
     m_tempDirRoot = dir;
@@ -372,6 +378,11 @@
                        row, 0);
     subgrid->addWidget(resampleOnLoad, 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);
+
 //!!!    subgrid->addWidget(new QLabel(tr("Playback audio device:")), row, 0);
 //!!!    subgrid->addWidget(audioDevice, row++, 1, 1, 2);
 
@@ -645,6 +656,13 @@
 }
 
 void
+PreferencesDialog::gaplessModeChanged(int state)
+{
+    m_gapless = (state == Qt::Checked);
+    m_applyButton->setEnabled(true);
+}
+
+void
 PreferencesDialog::vampProcessSeparationChanged(int state)
 {
     m_runPluginsInProcess = (state == Qt::Unchecked);
@@ -767,6 +785,7 @@
     prefs->setTuningFrequency(m_tuningFrequency);
     prefs->setResampleQuality(m_resampleQuality);
     prefs->setResampleOnLoad(m_resampleOnLoad);
+    prefs->setUseGaplessMode(m_gapless);
     prefs->setRunPluginsInProcess(m_runPluginsInProcess);
     prefs->setShowSplash(m_showSplash);
     prefs->setTemporaryDirectoryRoot(m_tempDirRoot);
--- a/main/PreferencesDialog.h	Wed Nov 30 21:02:24 2016 +0000
+++ b/main/PreferencesDialog.h	Thu Dec 01 17:45:41 2016 +0000
@@ -57,6 +57,7 @@
     void audioDeviceChanged(int device);
     void resampleQualityChanged(int quality);
     void resampleOnLoadChanged(int state);
+    void gaplessModeChanged(int state);
     void vampProcessSeparationChanged(int state);
     void tempDirRootChanged(QString root);
     void backgroundModeChanged(int mode);
@@ -102,6 +103,7 @@
     int m_audioDevice;
     int m_resampleQuality;
     bool m_resampleOnLoad;
+    bool m_gapless;
     bool m_runPluginsInProcess;
     bool m_networkPermission;
     bool m_retina;