summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/QueuedEventSource.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/QueuedEventSource.hpp')
-rw-r--r--src/libs/engine/QueuedEventSource.hpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libs/engine/QueuedEventSource.hpp b/src/libs/engine/QueuedEventSource.hpp
index 4c23f226..df3c74a7 100644
--- a/src/libs/engine/QueuedEventSource.hpp
+++ b/src/libs/engine/QueuedEventSource.hpp
@@ -58,7 +58,9 @@ public:
protected:
void push_queued(QueuedEvent* const ev);
- inline void push_stamped(Event* const ev) { _stamped_queue.push(ev); }
+ inline void push_stamped(Event* const ev) {
+ std::cerr << "[QueuedEventSource] Pushing stamped @ " << ev->time() << std::endl;
+ _stamped_queue.push(ev); }
Event* pop_earliest_queued_before(const SampleCount time);
inline Event* pop_earliest_stamped_before(const SampleCount time);
@@ -96,9 +98,15 @@ QueuedEventSource::pop_earliest_stamped_before(const SampleCount time)
{
Event* ret = NULL;
- if (!_stamped_queue.empty() && _stamped_queue.front()->time() < time) {
- ret = _stamped_queue.front();
- _stamped_queue.pop();
+ if (!_stamped_queue.empty()) {
+ if (_stamped_queue.front()->time() < time) {
+ ret = _stamped_queue.front();
+ std::cerr << "[QueuedEventSource] Popping event @ " << _stamped_queue.front()->time() << std::endl;
+ _stamped_queue.pop();
+ } else {
+ std::cerr << "[QueuedEventSource] Next event is past " << time
+ << " (@ " << _stamped_queue.front()->time() << ")" << std::endl;
+ }
}
return ret;