- Glib::Mutex::Lock lm (_session.engine().process_lock());
- /* use of g_atomic here is just for code consistency - its protected by the lock
- for writing.
- */
- g_atomic_int_inc (&user_count);
- return &buffers;
-}
-
-void
-InternalReturn::release_buffers ()
-{
- Glib::Mutex::Lock lm (_session.engine().process_lock());
- if (user_count) {
- /* use of g_atomic here is just for code consistency - its protected by the lock
- for writing.
- */
- (void) g_atomic_int_dec_and_test (&user_count);
- }
-}
-
-void
-InternalReturn::cycle_start (nframes_t nframes)
-{
- /* called from process cycle - no lock necessary */
- if (user_count) {
- /* don't bother with this if nobody is going to feed us anything */
- buffers.silence (nframes, 0);
- }