diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index 417c8427d0..956495cb9e 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -148,6 +148,7 @@ public: static bool has_per_thread_pool (); static void create_per_thread_pool (const std::string& n, uint32_t nitems); static void init_event_pool (); + static guint pool_available (); CrossThreadPool* event_pool() const { return own_pool; } diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index d52c88e2bc..1225022175 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -43,6 +43,15 @@ SessionEvent::init_event_pool () pool = new PerThreadPool; } +guint +SessionEvent::pool_available () +{ + if (!pool || !pool->per_thread_pool (false)) { + return 0; + } + return pool->per_thread_pool()->available (); +} + bool SessionEvent::has_per_thread_pool () {