summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-06-23 19:41:58 +0000
committerDavid Robillard <d@drobilla.net>2008-06-23 19:41:58 +0000
commit11148a825b0363908ed18427e99392fc7047f747 (patch)
tree6e4e416bc60465e62311451a5d893a0abdc7df9d /src/libs/engine
parentc2af33c189d0e9c2c957f9e73d7995302faf7df9 (diff)
downloadingen-11148a825b0363908ed18427e99392fc7047f747.tar.gz
ingen-11148a825b0363908ed18427e99392fc7047f747.tar.bz2
ingen-11148a825b0363908ed18427e99392fc7047f747.zip
Move widget embedding down to FlowCanvas.
git-svn-id: http://svn.drobilla.net/lad/ingen@1274 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/JackAudioDriver.hpp6
-rw-r--r--src/libs/engine/QueuedEventSource.cpp2
-rw-r--r--src/libs/engine/QueuedEventSource.hpp16
3 files changed, 19 insertions, 5 deletions
diff --git a/src/libs/engine/JackAudioDriver.hpp b/src/libs/engine/JackAudioDriver.hpp
index 3beb775a..facdb580 100644
--- a/src/libs/engine/JackAudioDriver.hpp
+++ b/src/libs/engine/JackAudioDriver.hpp
@@ -108,7 +108,11 @@ public:
SampleCount sample_rate() const { return _sample_rate; }
bool is_activated() const { return _is_activated; }
- inline SampleCount frame_time() const { return jack_frame_time(_client); }
+ inline SampleCount frame_time() const {
+ const SampleCount t = jack_frame_time(_client);
+ std::cerr << "Frame time: " << t << std::endl;
+ return t;
+ }
class PortRegistrationFailedException : public std::exception {};
diff --git a/src/libs/engine/QueuedEventSource.cpp b/src/libs/engine/QueuedEventSource.cpp
index 4b63b6c4..690397ae 100644
--- a/src/libs/engine/QueuedEventSource.cpp
+++ b/src/libs/engine/QueuedEventSource.cpp
@@ -62,6 +62,8 @@ QueuedEventSource::push_queued(QueuedEvent* const ev)
{
assert(!ev->is_prepared());
+ cerr << "[QueuedEventSource] Pushing queued @ " << ev->time() << endl;
+
if (_events[_back] != NULL) {
cerr << "[QueuedEventSource] Error: Queue is full! Event is lost, please report!" << endl;
delete ev;
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;