summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/source_factory.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-09-10 21:53:13 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-09-10 21:53:13 +0000
commita0eca60f7adf29c0df3b6e49c0be79d4aff07c22 (patch)
tree78fb14d57163b997444fdca30bb8ad0e6d51b4d1 /libs/ardour/ardour/source_factory.h
parentafcbba17f01347b7bc59f9cff6e081be7645d60a (diff)
try to make peak building from scratch more efficient
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2445 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/source_factory.h')
-rw-r--r--libs/ardour/ardour/source_factory.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/ardour/source_factory.h b/libs/ardour/ardour/source_factory.h
index 94ceb9c441..db9f6dfd5a 100644
--- a/libs/ardour/ardour/source_factory.h
+++ b/libs/ardour/ardour/source_factory.h
@@ -20,10 +20,14 @@
#ifndef __ardour_source_factory_h__
#define __ardour_source_factory_h__
+#include <list>
+#include <glibmm/thread.h>
+
#include <string>
#include <stdint.h>
#include <sigc++/sigc++.h>
#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
#include <ardour/source.h>
#include <ardour/audiofilesource.h>
@@ -36,6 +40,8 @@ class Session;
class SourceFactory {
public:
+ static void init ();
+
static sigc::signal<void,boost::shared_ptr<Source> > SourceCreated;
static boost::shared_ptr<Source> create (Session&, const XMLNode& node, bool async = false);
@@ -45,7 +51,12 @@ class SourceFactory {
static boost::shared_ptr<Source> createReadable (Session&, std::string path, int chn, AudioFileSource::Flag flags, bool announce = true, bool async = false);
static boost::shared_ptr<Source> createWritable (Session&, std::string name, bool destructive, nframes_t rate, bool announce = true, bool async = false);
+ static Glib::Cond* PeaksToBuild;
+ static Glib::StaticMutex peak_building_lock;
+ static std::list<boost::weak_ptr<AudioSource> > files_with_peaks;
+
private:
+
static int setup_peakfile (boost::shared_ptr<Source>, bool async);
};