diff framework/SVFileReader.cpp @ 360:88bf6cc73275 tonioni

For Tony, resample all audio to 44100 on load
author Chris Cannam
date Fri, 13 Jun 2014 12:56:31 +0100
parents 2da91cceed64
children 5302c548adad
line wrap: on
line diff
--- a/framework/SVFileReader.cpp	Fri Jun 13 10:37:04 2014 +0100
+++ b/framework/SVFileReader.cpp	Fri Jun 13 12:56:31 2014 +0100
@@ -475,8 +475,10 @@
 
             size_t rate = 0;
 
-            if (!mainModel &&
-                Preferences::getInstance()->getResampleOnLoad()) {
+            if (Preferences::getInstance()->getFixedSampleRate() != 0) {
+                rate = Preferences::getInstance()->getFixedSampleRate();
+            } else if (!mainModel &&
+                       Preferences::getInstance()->getResampleOnLoad()) {
                 WaveFileModel *mm = m_document->getMainModel();
                 if (mm) rate = mm->getSampleRate();
             }