changeset 11:21a31c779384

* progress tweaks
author Chris Cannam
date Fri, 12 Dec 2008 16:12:05 +0000
parents 12f250173bf2
children d20c728c9840
files runner/FeatureExtractionManager.cpp
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/runner/FeatureExtractionManager.cpp	Fri Dec 12 15:33:55 2008 +0000
+++ b/runner/FeatureExtractionManager.cpp	Fri Dec 12 16:12:05 2008 +0000
@@ -367,9 +367,9 @@
 {
     if (m_plugins.empty()) return;
 
-    ProgressPrinter printer("Retrieving audio data...");
+    ProgressPrinter retrievalProgress("Retrieving audio data...");
 
-    FileSource source(audioSource, &printer);
+    FileSource source(audioSource, &retrievalProgress);
     if (!source.isAvailable()) {
         cerr << "ERROR: File or URL \"" << audioSource.toStdString()
              << "\" could not be located" << endl;
@@ -399,7 +399,7 @@
     }
 
     AudioFileReader *reader =
-        AudioFileReaderFactory::createReader(source, m_sampleRate, &printer);
+        AudioFileReaderFactory::createReader(source, m_sampleRate, &retrievalProgress);
     
     if (!reader) {
         cerr << "ERROR: File or URL \"" << audioSource.toStdString()
@@ -408,7 +408,9 @@
     }
 
     size_t channels = reader->getChannelCount();
-    
+
+    retrievalProgress.done();
+
     cerr << "Opened " << channels << "-channel file or URL \"" << audioSource.toStdString() << "\"" << endl;
 
     // reject file if it has too few channels, plugin will handle if it has too many