interpolation.cc/.h: Spline-Bugfixes: Crash bug at tempos close to 0, wrong calculati...
[ardour.git] / libs / ardour / audio_region_importer.cc
index bea61d81e3915789e2232180adf34d658f33de2f..de5d6f7102cd97bde49576f0553cc5b3c2bf30be 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "i18n.h"
 
+using namespace std;
 using namespace PBD;
 using namespace ARDOUR;
 
@@ -336,23 +337,22 @@ AudioRegionImporter::prepare_sources ()
                return;
        }
        
-       Session::ImportStatus status;
+       status.total = 0;
+       status.replace_existing_source = false;
+       status.done = false;
+       status.cancel = false;
+       status.freeze = false;
+       status.progress = 0.0;
+       status.quality = SrcBest; // TODO other qualities also
        
        // Get sources that still need to be imported
        for (std::list<string>::iterator it = filenames.begin(); it != filenames.end(); ++it) {
                if (!handler.check_source (*it)) {
                        status.paths.push_back (*it);
+                       status.total++;
                }
        }
        
-       // Prepare rest of import struct TODO quality
-       status.replace_existing_source = false;
-       status.done = false;
-       status.cancel = false;
-       status.freeze = false;
-       status.progress = 0.0;
-       status.quality = SrcBest;
-       
        // import files
        // TODO: threading & exception handling
        session.import_audiofiles (status);