diff options
author | David Robillard <d@drobilla.net> | 2013-01-12 04:41:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-12 04:41:22 +0000 |
commit | 8264084f6838911f12e5df3b4450ea76542a7f55 (patch) | |
tree | 84c5bfd7444591eaa476015f53e4f55f8a1e50b7 /src | |
parent | ec0744d2a0773d1aa858c9c1135f77baf25d5a21 (diff) | |
download | machina-8264084f6838911f12e5df3b4450ea76542a7f55.tar.gz machina-8264084f6838911f12e5df3b4450ea76542a7f55.tar.bz2 machina-8264084f6838911f12e5df3b4450ea76542a7f55.zip |
Fix MIDI import.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4932 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/Controller.cpp | 2 | ||||
-rw-r--r-- | src/engine/Machine.cpp | 9 | ||||
-rw-r--r-- | src/gui/MachinaCanvas.cpp | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/engine/Controller.cpp b/src/engine/Controller.cpp index f209018..f29d10e 100644 --- a/src/engine/Controller.cpp +++ b/src/engine/Controller.cpp @@ -78,7 +78,7 @@ Controller::announce(SharedPtr<Machine> machine) SharedPtr<Client::ClientObject> eobj( new Client::ClientObject((*e)->id())); eobj->set(URIs::instance().rdf_type, - forge.make_urid(URIs::instance().rdf_type)); + forge.make_urid(URIs::instance().machina_Edge)); eobj->set(URIs::instance().machina_probability, forge.make((*e)->probability())); eobj->set(URIs::instance().machina_tail_id, diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp index 92a0d7e..0792331 100644 --- a/src/engine/Machine.cpp +++ b/src/engine/Machine.cpp @@ -169,7 +169,7 @@ Machine::reset(MIDISink* sink, Raul::TimeStamp time) ++n) { SharedPtr<Node> node = (*n); - if (sink && node->is_active()) { + if (node->is_active()) { node->exit(sink, time); } @@ -196,8 +196,11 @@ Machine::earliest_node() const SharedPtr<Node> node = _active_nodes.at(i); if (node) { - assert(node->is_active()); - if (!earliest || ( node->exit_time() < earliest->exit_time()) ) { + if (!node->is_active()) { + std::cerr << "Inactive node in active node list" << std::endl; + continue; + } + if (!earliest || (node->exit_time() < earliest->exit_time()) ) { earliest = node; } } diff --git a/src/gui/MachinaCanvas.cpp b/src/gui/MachinaCanvas.cpp index ac59376..2501cec 100644 --- a/src/gui/MachinaCanvas.cpp +++ b/src/gui/MachinaCanvas.cpp @@ -146,7 +146,7 @@ MachinaCanvas::on_new_object(SharedPtr<Client::ClientObject> object) object->set_view(view); } else { - std::cerr << "Unknown object type" << std::endl; + std::cerr << "Unknown object type " << type.get<URIInt>() << std::endl; } } |