diff data/model/WaveFileModel.cpp @ 921:2896b8872834 tonioni

Add normalise preference and take it into account in WaveFileModel
author Chris Cannam
date Fri, 13 Jun 2014 16:12:00 +0100
parents e802e550a1f2
children d03b3d956358
line wrap: on
line diff
--- a/data/model/WaveFileModel.cpp	Fri Jun 13 16:03:48 2014 +0100
+++ b/data/model/WaveFileModel.cpp	Fri Jun 13 16:12:00 2014 +0100
@@ -20,6 +20,8 @@
 
 #include "system/System.h"
 
+#include "base/Preferences.h"
+
 #include <QFileInfo>
 #include <QTextStream>
 
@@ -49,8 +51,9 @@
 {
     m_source.waitForData();
     if (m_source.isOK()) {
+        bool normalise = Preferences::getInstance()->getNormaliseAudio();
         m_reader = AudioFileReaderFactory::createThreadingReader
-            (m_source, targetRate);
+            (m_source, targetRate, normalise);
         if (m_reader) {
             SVDEBUG << "WaveFileModel::WaveFileModel: reader rate: "
                       << m_reader->getSampleRate() << endl;