diff data/fileio/AudioFileSizeEstimator.cpp @ 1104:393134235fa0 simple-fft-model

Two-channel test
author Chris Cannam
date Tue, 16 Jun 2015 20:32:44 +0100
parents 329ddaf7415d
children 513e4d67d8df
line wrap: on
line diff
--- a/data/fileio/AudioFileSizeEstimator.cpp	Tue Jun 16 20:28:23 2015 +0100
+++ b/data/fileio/AudioFileSizeEstimator.cpp	Tue Jun 16 20:32:44 2015 +0100
@@ -18,6 +18,8 @@
 
 #include <QFile>
 
+//#define DEBUG_AUDIO_FILE_SIZE_ESTIMATOR 1
+
 sv_frame_t
 AudioFileSizeEstimator::estimate(FileSource source,
 				 sv_samplerate_t targetRate)
@@ -61,7 +63,9 @@
 	{
 	    QFile f(source.getLocalFilename());
 	    if (f.open(QFile::ReadOnly)) {
+#ifdef DEBUG_AUDIO_FILE_SIZE_ESTIMATOR
 		cerr << "opened file, size is "  << f.size() << endl;
+#endif
 		sz = f.size();
 		f.close();
 	    }
@@ -90,11 +94,14 @@
 	    estimate = sv_frame_t(double(sz) * 1.2 * rateRatio);
 	}
 
+#ifdef DEBUG_AUDIO_FILE_SIZE_ESTIMATOR
 	cerr << "AudioFileSizeEstimator: for extension " << extension << ", estimate = " << estimate << endl;
-    
+#endif
     }
 
+#ifdef DEBUG_AUDIO_FILE_SIZE_ESTIMATOR
     cerr << "estimate = " << estimate << endl;
+#endif
     
     return estimate;
 }