diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/JackDriver.h | 6 | ||||
-rw-r--r-- | src/Patchage.cpp | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/JackDriver.h b/src/JackDriver.h index 7acbad8..5f5777b 100644 --- a/src/JackDriver.h +++ b/src/JackDriver.h @@ -22,7 +22,7 @@ #include <boost/shared_ptr.hpp> #include <jack/jack.h> #include <jack/statistics.h> -#include <raul/Queue.h> +#include <raul/SRSWQueue.h> #include "Driver.h" class Patchage; class PatchageEvent; @@ -50,7 +50,7 @@ public: bool is_attached() const { return (m_client != NULL); } bool is_realtime() const { return m_client && jack_is_realtime(m_client); } - Queue<PatchageEvent>& events() { return m_events; } + SRSWQueue<PatchageEvent>& events() { return m_events; } void refresh(); @@ -106,7 +106,7 @@ private: Patchage* m_app; jack_client_t* m_client; - Queue<PatchageEvent> m_events; + SRSWQueue<PatchageEvent> m_events; bool m_is_activated; jack_position_t m_last_pos; diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 61a9abd..b7f601c 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -295,9 +295,13 @@ Patchage::attach() bool Patchage::idle_callback() { - if (m_jack_driver) - while (m_jack_driver->events().fill() > 0) - m_jack_driver->events().pop().execute(); + if (m_jack_driver) { + while (!m_jack_driver->events().empty()) { + PatchageEvent& ev = m_jack_driver->events().front(); + m_jack_driver->events().pop(); + ev.execute(); + } + } bool refresh = m_refresh; |