summaryrefslogtreecommitdiff
path: root/libs/ardour/source_factory.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-25 17:48:55 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-25 17:48:55 +0000
commit3cd8138a419cb165f56070ace0b21a1e63ec5a43 (patch)
tree51efe9abff24a1367be227aebf8e2901433b0b88 /libs/ardour/source_factory.cc
parenteb6e352dd0a307badf68ae4a216d15c03b4685de (diff)
convert from Glib:: to Glib::Threads for all thread-related API
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/source_factory.cc')
-rw-r--r--libs/ardour/source_factory.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index b0803a9d34..da5980599d 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -50,8 +50,8 @@ using namespace std;
using namespace PBD;
PBD::Signal1<void,boost::shared_ptr<Source> > SourceFactory::SourceCreated;
-Glib::Cond* SourceFactory::PeaksToBuild;
-Glib::StaticMutex SourceFactory::peak_building_lock = GLIBMM_STATIC_MUTEX_INIT;
+Glib::Threads::Cond SourceFactory::PeaksToBuild;
+Glib::Threads::Mutex SourceFactory::peak_building_lock;
std::list<boost::weak_ptr<AudioSource> > SourceFactory::files_with_peaks;
static void
@@ -65,7 +65,7 @@ peak_thread_work ()
wait:
if (SourceFactory::files_with_peaks.empty()) {
- SourceFactory::PeaksToBuild->wait (SourceFactory::peak_building_lock);
+ SourceFactory::PeaksToBuild.wait (SourceFactory::peak_building_lock);
}
if (SourceFactory::files_with_peaks.empty()) {
@@ -87,10 +87,8 @@ peak_thread_work ()
void
SourceFactory::init ()
{
- PeaksToBuild = new Glib::Cond();
-
for (int n = 0; n < 2; ++n) {
- Glib::Thread::create (sigc::ptr_fun (::peak_thread_work), false);
+ Glib::Threads::Thread::create (sigc::ptr_fun (::peak_thread_work));
}
}
@@ -103,9 +101,9 @@ SourceFactory::setup_peakfile (boost::shared_ptr<Source> s, bool async)
if (async) {
- Glib::Mutex::Lock lm (peak_building_lock);
+ Glib::Threads::Mutex::Lock lm (peak_building_lock);
files_with_peaks.push_back (boost::weak_ptr<AudioSource> (as));
- PeaksToBuild->broadcast ();
+ PeaksToBuild.broadcast ();
} else {