Mercurial > hg > svcore
comparison data/model/WaveFileModel.cpp @ 933:d03b3d956358 warnfix_no_size_t
Merge from branch tony_integration
author | Chris Cannam |
---|---|
date | Wed, 18 Jun 2014 08:34:46 +0100 |
parents | df82da55e86a 2896b8872834 |
children | 6d2ece0fe356 |
comparison
equal
deleted
inserted
replaced
932:e06f03013f46 | 933:d03b3d956358 |
---|---|
18 #include "fileio/AudioFileReader.h" | 18 #include "fileio/AudioFileReader.h" |
19 #include "fileio/AudioFileReaderFactory.h" | 19 #include "fileio/AudioFileReaderFactory.h" |
20 | 20 |
21 #include "system/System.h" | 21 #include "system/System.h" |
22 | 22 |
23 #include "base/Preferences.h" | |
24 | |
23 #include <QFileInfo> | 25 #include <QFileInfo> |
24 #include <QTextStream> | 26 #include <QTextStream> |
25 | 27 |
26 #include <iostream> | 28 #include <iostream> |
27 #include <unistd.h> | 29 #include <unistd.h> |
47 m_lastDirectReadStart(0), | 49 m_lastDirectReadStart(0), |
48 m_lastDirectReadCount(0) | 50 m_lastDirectReadCount(0) |
49 { | 51 { |
50 m_source.waitForData(); | 52 m_source.waitForData(); |
51 if (m_source.isOK()) { | 53 if (m_source.isOK()) { |
54 bool normalise = Preferences::getInstance()->getNormaliseAudio(); | |
52 m_reader = AudioFileReaderFactory::createThreadingReader | 55 m_reader = AudioFileReaderFactory::createThreadingReader |
53 (m_source, targetRate); | 56 (m_source, targetRate, normalise); |
54 if (m_reader) { | 57 if (m_reader) { |
55 SVDEBUG << "WaveFileModel::WaveFileModel: reader rate: " | 58 SVDEBUG << "WaveFileModel::WaveFileModel: reader rate: " |
56 << m_reader->getSampleRate() << endl; | 59 << m_reader->getSampleRate() << endl; |
57 } | 60 } |
58 } | 61 } |