From c1cde1acd893d3ecd4fc927ee7bb482fa7b8d294 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sun, 20 Feb 2011 20:19:48 +0100 Subject: [PATCH] Invoke the "resampling" filter only if the target sampling rate is really different from the file's current sampling rate. --- src/Dialog_Processing.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp index 9c59825f..99a3cdb6 100644 --- a/src/Dialog_Processing.cpp +++ b/src/Dialog_Processing.cpp @@ -583,7 +583,10 @@ void ProcessingDialog::startNextJob(void) if((m_settings->samplingRate() > 0) && !nativeResampling) { - thread->addFilter(new ResampleFilter(SettingsModel::samplingRates[m_settings->samplingRate()])); + if(SettingsModel::samplingRates[m_settings->samplingRate()] != currentFile.formatAudioSamplerate() || currentFile.formatAudioSamplerate() == 0) + { + thread->addFilter(new ResampleFilter(SettingsModel::samplingRates[m_settings->samplingRate()])); + } } if((m_settings->toneAdjustBass() != 0) || (m_settings->toneAdjustTreble() != 0)) {