Mercurial > hg > sonic-visualiser
diff main/PreferencesDialog.cpp @ 32:e3b32dc5180b
* Make resampler quality configurable
* Fall back to linear resampling when playing very fast
* Switch off transient detection in time stretcher when playing very very fast
author | Chris Cannam |
---|---|
date | Thu, 21 Sep 2006 11:17:19 +0000 |
parents | 8b34a6460545 |
children | f3516e520652 |
line wrap: on
line diff
--- a/main/PreferencesDialog.cpp Thu Sep 21 09:43:41 2006 +0000 +++ b/main/PreferencesDialog.cpp Thu Sep 21 11:17:19 2006 +0000 @@ -94,6 +94,20 @@ connect(frequency, SIGNAL(valueChanged(double)), this, SLOT(tuningFrequencyChanged(double))); + QComboBox *resampleQuality = new QComboBox; + + int rsq = prefs->getPropertyRangeAndValue("Resample Quality", &min, &max); + m_resampleQuality = rsq; + + for (i = min; i <= max; ++i) { + resampleQuality->addItem(prefs->getPropertyValueLabel("Resample Quality", i)); + } + + resampleQuality->setCurrentIndex(rsq); + + connect(resampleQuality, SIGNAL(currentIndexChanged(int)), + this, SLOT(resampleQualityChanged(int))); + int row = 0; subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel @@ -106,6 +120,11 @@ row, 0); subgrid->addWidget(frequency, row++, 1, 1, 2); + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Resample Quality"))), + row, 0); + subgrid->addWidget(resampleQuality, row++, 1, 1, 2); + subgrid->addWidget(new QLabel(prefs->getPropertyLabel ("Smooth Spectrogram")), row, 0, 1, 2); @@ -168,6 +187,13 @@ } void +PreferencesDialog::resampleQualityChanged(int q) +{ + m_resampleQuality = q; + m_applyButton->setEnabled(true); +} + +void PreferencesDialog::okClicked() { applyClicked(); @@ -183,6 +209,7 @@ prefs->setPropertyBoxLayout(Preferences::PropertyBoxLayout (m_propertyLayout)); prefs->setTuningFrequency(m_tuningFrequency); + prefs->setResampleQuality(m_resampleQuality); m_applyButton->setEnabled(false); }