diff main/PreferencesDialog.cpp @ 1283:ca5dcee081ef project-file-rework

Merge from branch piper
author Chris Cannam
date Tue, 25 Oct 2016 11:06:00 +0100
parents 0c6cdcf53641
children a264b51728cf
line wrap: on
line diff
--- a/main/PreferencesDialog.cpp	Mon Oct 24 17:54:50 2016 +0100
+++ b/main/PreferencesDialog.cpp	Tue Oct 25 11:06:00 2016 +0100
@@ -80,6 +80,13 @@
     connect(m_windowTypeSelector, SIGNAL(windowTypeChanged(WindowType)),
             this, SLOT(windowTypeChanged(WindowType)));
 
+    QCheckBox *vampProcessSeparation = new QCheckBox;
+    m_runPluginsInProcess = prefs->getRunPluginsInProcess();
+    vampProcessSeparation->setCheckState(m_runPluginsInProcess ? Qt::Unchecked :
+                                         Qt::Checked);
+    connect(vampProcessSeparation, SIGNAL(stateChanged(int)),
+            this, SLOT(vampProcessSeparationChanged(int)));
+    
     QComboBox *smoothing = new QComboBox;
     
     int sm = prefs->getPropertyRangeAndValue("Spectrogram Y Smoothing", &min, &max,
@@ -472,8 +479,13 @@
                                                 ("Window Type"))),
                        row, 0);
     subgrid->addWidget(m_windowTypeSelector, row++, 1, 2, 2);
+
     subgrid->setRowStretch(row, 10);
     row++;
+
+    subgrid->addWidget(new QLabel(tr("Run Vamp plugins in separate process:")),
+                       row, 0);
+    subgrid->addWidget(vampProcessSeparation, row++, 1, 1, 1);
     
     subgrid->setRowStretch(row, 10);
     
@@ -633,6 +645,14 @@
 }
 
 void
+PreferencesDialog::vampProcessSeparationChanged(int state)
+{
+    m_runPluginsInProcess = (state == Qt::Unchecked);
+    m_applyButton->setEnabled(true);
+    m_changesOnRestart = true;
+}
+
+void
 PreferencesDialog::networkPermissionChanged(int state)
 {
     m_networkPermission = (state == Qt::Checked);
@@ -747,6 +767,7 @@
     prefs->setTuningFrequency(m_tuningFrequency);
     prefs->setResampleQuality(m_resampleQuality);
     prefs->setResampleOnLoad(m_resampleOnLoad);
+    prefs->setRunPluginsInProcess(m_runPluginsInProcess);
     prefs->setShowSplash(m_showSplash);
     prefs->setTemporaryDirectoryRoot(m_tempDirRoot);
     prefs->setBackgroundMode(Preferences::BackgroundMode(m_backgroundMode));