From d288ce4b8180e4c79f61bed85f0fa5d4cd36acc3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 25 Feb 2007 06:08:54 +0000 Subject: Command line app loads again. Loading fixes, works now (except init is messed up). git-svn-id: http://svn.drobilla.net/lad/machina@339 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/machina/Engine.hpp | 9 ++++----- src/engine/machina/JackDriver.hpp | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/engine/machina') diff --git a/src/engine/machina/Engine.hpp b/src/engine/machina/Engine.hpp index cd4cf27..37aa2db 100644 --- a/src/engine/machina/Engine.hpp +++ b/src/engine/machina/Engine.hpp @@ -20,6 +20,7 @@ #include #include +#include "machina/JackDriver.hpp" namespace Machina { @@ -29,13 +30,12 @@ class JackDriver; class Engine { public: - Engine(SharedPtr driver, SharedPtr machine) + Engine(SharedPtr driver) : _driver(driver) - , _machine(machine) - {} + { } SharedPtr driver() { return _driver; } - SharedPtr machine() { return _machine; } + SharedPtr machine() { return _driver->machine(); } SharedPtr load_machine(const Glib::ustring& uri); @@ -44,7 +44,6 @@ public: private: SharedPtr _driver; - SharedPtr _machine; }; diff --git a/src/engine/machina/JackDriver.hpp b/src/engine/machina/JackDriver.hpp index f78c1f1..91f4106 100644 --- a/src/engine/machina/JackDriver.hpp +++ b/src/engine/machina/JackDriver.hpp @@ -40,11 +40,12 @@ class Node; class JackDriver : public Raul::JackDriver, public Machina::MidiDriver, public boost::enable_shared_from_this { public: - JackDriver(); + JackDriver(SharedPtr machine = SharedPtr()); void attach(const std::string& client_name); void detach(); + SharedPtr machine() { return _machine; } void set_machine(SharedPtr machine) { _machine = machine; } void write_event(Raul::BeatTime time, -- cgit v1.2.1