Add some debug code to time things in the process
[ardour.git] / libs / ardour / audioengine.cc
index 34a79c35f8520dcef3cd8e34c38a6c87e29eeba8..06a1637382ded9ede0c658a5571ad3e0fef8ecd9 100644 (file)
@@ -446,9 +446,11 @@ int
 AudioEngine::process_callback (pframes_t nframes)
 {
        GET_PRIVATE_JACK_POINTER_RET(_jack,0);
-       // CycleTimer ct ("AudioEngine::process");
        Glib::Mutex::Lock tm (_process_lock, Glib::TRY_LOCK);
 
+       PT_TIMING_REF;
+       PT_TIMING_CHECK (1);
+
        /// The number of frames that will have been processed when we've finished
        pframes_t next_processed_frames;
 
@@ -504,7 +506,6 @@ AudioEngine::process_callback (pframes_t nframes)
        } else {
                if (_session) {
                        _session->process (nframes);
-
                }
        }
 
@@ -555,6 +556,9 @@ AudioEngine::process_callback (pframes_t nframes)
        }
 
        _processed_frames = next_processed_frames;
+
+       PT_TIMING_CHECK (2);
+       
        return 0;
 }