Mercurial > hg > sonic-annotator
diff runner/FeatureExtractionManager.cpp @ 116:1c0799754670
Normalise option (yet to be tested)
author | Chris Cannam |
---|---|
date | Fri, 03 Oct 2014 15:42:55 +0100 |
parents | 297f9e415e39 |
children | 5be4995f4029 |
line wrap: on
line diff
--- a/runner/FeatureExtractionManager.cpp Fri Oct 03 15:07:19 2014 +0100 +++ b/runner/FeatureExtractionManager.cpp Fri Oct 03 15:42:55 2014 +0100 @@ -59,7 +59,8 @@ m_blockSize(16384), m_defaultSampleRate(0), m_sampleRate(0), - m_channels(0) + m_channels(0), + m_normalise(false) { } @@ -84,6 +85,11 @@ m_defaultSampleRate = sampleRate; } +void FeatureExtractionManager::setNormalise(bool normalise) +{ + m_normalise = normalise; +} + static PluginSummarisingAdapter::SummaryType getSummaryType(string name) { @@ -457,7 +463,8 @@ // (then close, and open again later with actual desired rate &c) AudioFileReader *reader = - AudioFileReaderFactory::createReader(source, 0, false, + AudioFileReaderFactory::createReader(source, 0, + m_normalise, &retrievalProgress); if (!reader) { @@ -556,8 +563,9 @@ ProgressPrinter retrievalProgress("Retrieving audio data..."); FileSource fs(source, &retrievalProgress); fs.waitForData(); - reader = AudioFileReaderFactory::createReader - (fs, m_sampleRate, false, &retrievalProgress); + reader = AudioFileReaderFactory::createReader(fs, m_sampleRate, + m_normalise, + &retrievalProgress); retrievalProgress.done(); } if (!reader) {