diff options
author | David Robillard <d@drobilla.net> | 2017-02-18 18:32:02 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-18 19:38:13 +0100 |
commit | f240b08a1799b3aa6a29701c90388d51c0c1b2ce (patch) | |
tree | 28ec7429aa10f28710023fdcc43d07a4f0b4ebc9 /src/server/events | |
parent | 6141b832946006a6ec3c1a3a70bd729c0404771e (diff) | |
download | ingen-f240b08a1799b3aa6a29701c90388d51c0c1b2ce.tar.gz ingen-f240b08a1799b3aa6a29701c90388d51c0c1b2ce.tar.bz2 ingen-f240b08a1799b3aa6a29701c90388d51c0c1b2ce.zip |
Add experimental PortAudio driver
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/CreateGraph.cpp | 9 | ||||
-rw-r--r-- | src/server/events/CreatePort.cpp | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp index 304656af..99b29b66 100644 --- a/src/server/events/CreateGraph.cpp +++ b/src/server/events/CreateGraph.cpp @@ -194,8 +194,13 @@ void CreateGraph::execute(RunContext& context) { if (_graph) { - if (_parent && _compiled_graph) { - _parent->set_compiled_graph(std::move(_compiled_graph)); + if (_parent) { + if (_compiled_graph) { + _parent->set_compiled_graph(std::move(_compiled_graph)); + } + } else { + _engine.set_root_graph(_graph); + _graph->enable(); } for (Event* ev : _child_events) { diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 4e34762a..3adf2f8b 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -102,6 +102,9 @@ CreatePort::pre_process(PreProcessContext& ctx) return Event::pre_process_done(Status::PARENT_NOT_FOUND, parent_path); } else if (!(_graph = dynamic_cast<GraphImpl*>(parent))) { return Event::pre_process_done(Status::INVALID_PARENT, parent_path); + } else if (!_graph->parent() && _engine.activated() && + !_engine.driver()->dynamic_ports()) { + return Event::pre_process_done(Status::CREATION_FAILED, _path); } const URIs& uris = _engine.world()->uris(); |