summaryrefslogtreecommitdiff
path: root/libs/ardour/auditioner.cc
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2006-06-07 14:54:12 +0000
committerTaybin Rutkin <taybin@taybin.com>2006-06-07 14:54:12 +0000
commit9fdc36bac5fa1c004751c0dd42f9ff62b9d60814 (patch)
tree34a2d26c5cadcbe5c31b424e3e50a34a4360d87b /libs/ardour/auditioner.cc
parent55ba7c46c60d3cc9938abc34252fa930f1c883cb (diff)
Merged timbyr's win32 branch. -r 547:566.
git-svn-id: svn://localhost/ardour2/trunk@567 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/auditioner.cc')
-rw-r--r--libs/ardour/auditioner.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc
index ed97cf7b39..ce7b9a3e6f 100644
--- a/libs/ardour/auditioner.cc
+++ b/libs/ardour/auditioner.cc
@@ -18,7 +18,7 @@
$Id$
*/
-#include <pbd/lockmonitor.h>
+#include <glibmm/thread.h>
#include <ardour/diskstream.h>
#include <ardour/audioregion.h>
@@ -57,7 +57,7 @@ Auditioner::Auditioner (Session& s)
IO::output_changed.connect (mem_fun (*this, &Auditioner::output_changed));
the_region = 0;
- atomic_set (&_active, 0);
+ g_atomic_int_set (&_active, 0);
}
Auditioner::~Auditioner ()
@@ -74,14 +74,14 @@ Auditioner::prepare_playlist ()
void
Auditioner::audition_current_playlist ()
{
- if (atomic_read (&_active)) {
+ if (g_atomic_int_get (&_active)) {
/* don't go via session for this, because we are going
to remain active.
*/
cancel_audition ();
}
- LockMonitor lm (lock, __LINE__, __FILE__);
+ Glib::Mutex::Lock lm (lock);
diskstream->seek (0);
length = diskstream->playlist()->get_maximum_extent();
current_frame = 0;
@@ -90,20 +90,20 @@ Auditioner::audition_current_playlist ()
_panner->reset (n_outputs(), diskstream->n_channels());
- atomic_set (&_active, 1);
+ g_atomic_int_set (&_active, 1);
}
void
Auditioner::audition_region (AudioRegion& region)
{
- if (atomic_read (&_active)) {
+ if (g_atomic_int_get (&_active)) {
/* don't go via session for this, because we are going
to remain active.
*/
cancel_audition ();
}
- LockMonitor lm (lock, __LINE__, __FILE__);
+ Glib::Mutex::Lock lm (lock);
the_region = new AudioRegion (region);
the_region->set_position (0, this);
@@ -126,7 +126,7 @@ Auditioner::audition_region (AudioRegion& region)
length = the_region->length();
diskstream->seek (0);
current_frame = 0;
- atomic_set (&_active, 1);
+ g_atomic_int_set (&_active, 1);
}
int
@@ -136,7 +136,7 @@ Auditioner::play_audition (jack_nframes_t nframes)
jack_nframes_t this_nframes;
int ret;
- if (atomic_read (&_active) == 0) {
+ if (g_atomic_int_get (&_active) == 0) {
silence (nframes, 0);
return 0;
}