clean up debugging
[ardour.git] / libs / ardour / auditioner.cc
index baf97292ec96a34dc50f0eb23180e8e0060a9d69..d7605f26e1b3bc4d28da7dae431dc8f54c9207ef 100644 (file)
@@ -176,11 +176,15 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
        }
 
         ProcessorStreams ps;
-        if (configure_processors (&ps)) {
-                error << string_compose (_("Cannot setup auditioner processing flow for %1 channels"), 
-                                         _diskstream->n_channels()) << endmsg;
-                return;
-        }
+       {
+               Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
+
+               if (configure_processors (&ps)) {
+                       error << string_compose (_("Cannot setup auditioner processing flow for %1 channels"), 
+                                                _diskstream->n_channels()) << endmsg;
+                       return;
+               }
+       }
 
        /* force a panner reset now that we have all channels */
 
@@ -189,7 +193,7 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
        length = the_region->length();
 
        int dir;
-       nframes_t offset = the_region->sync_offset (dir);
+       framecnt_t offset = the_region->sync_offset (dir);
 
        /* can't audition from a negative sync point */
 
@@ -204,10 +208,10 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
 }
 
 int
-Auditioner::play_audition (nframes_t nframes)
+Auditioner::play_audition (framecnt_t nframes)
 {
        bool need_butler = false;
-       nframes_t this_nframes;
+       framecnt_t this_nframes;
        int ret;
 
        if (g_atomic_int_get (&_auditioning) == 0) {