Cleanup previous commit.
[ardour.git] / libs / ardour / analyser.cc
index 823d425bcfd12690cf758491fbe174b51401e125..2e68cfed8332cc3ad91746e6812fff00665c8464 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2008 Paul Davis 
+    Copyright (C) 2008 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 */
-#include <cassert>
 
-#include <ardour/analyser.h>
-#include <ardour/audiofilesource.h>
-#include <ardour/transient_detector.h>
+#include "ardour/analyser.h"
+#include "ardour/audiofilesource.h"
+#include "ardour/transient_detector.h"
 
-#include <pbd/pthread_utils.h>
-#include <pbd/convert.h>
+#include "pbd/pthread_utils.h"
+#include "pbd/convert.h"
 
 using namespace std;
 using namespace sigc;
@@ -37,7 +36,7 @@ list<boost::weak_ptr<Source> > Analyser::analysis_queue;
 
 Analyser::Analyser ()
 {
-       
+
 }
 
 Analyser::~Analyser ()
@@ -76,7 +75,7 @@ Analyser::queue_source_for_analysis (boost::shared_ptr<Source> src, bool force)
 void
 Analyser::work ()
 {
-       PBD::ThreadCreated (pthread_self(), string ("analyser-") + to_string (pthread_self(), std::dec));
+       PBD::notify_gui_about_thread_creation (pthread_self(), string ("analyser-") + to_string (pthread_self(), std::dec));
 
        while (true) {
                analysis_queue_lock.lock ();
@@ -96,7 +95,7 @@ Analyser::work ()
 
                boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src);
 
-               if (afs && afs->length()) {
+               if (afs && afs->length(afs->timeline_position())) {
                        analyse_audio_file_source (afs);
                }
        }
@@ -117,4 +116,3 @@ Analyser::analyse_audio_file_source (boost::shared_ptr<AudioFileSource> src)
 
 }
 
-