aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/machina')
-rw-r--r--src/engine/machina/Engine.hpp9
-rw-r--r--src/engine/machina/JackDriver.hpp3
2 files changed, 6 insertions, 6 deletions
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 <glibmm/ustring.h>
#include <raul/SharedPtr.h>
+#include "machina/JackDriver.hpp"
namespace Machina {
@@ -29,13 +30,12 @@ class JackDriver;
class Engine {
public:
- Engine(SharedPtr<JackDriver> driver, SharedPtr<Machine> machine)
+ Engine(SharedPtr<JackDriver> driver)
: _driver(driver)
- , _machine(machine)
- {}
+ { }
SharedPtr<JackDriver> driver() { return _driver; }
- SharedPtr<Machine> machine() { return _machine; }
+ SharedPtr<Machine> machine() { return _driver->machine(); }
SharedPtr<Machine> load_machine(const Glib::ustring& uri);
@@ -44,7 +44,6 @@ public:
private:
SharedPtr<JackDriver> _driver;
- SharedPtr<Machine> _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<JackDriver> {
public:
- JackDriver();
+ JackDriver(SharedPtr<Machine> machine = SharedPtr<Machine>());
void attach(const std::string& client_name);
void detach();
+ SharedPtr<Machine> machine() { return _machine; }
void set_machine(SharedPtr<Machine> machine) { _machine = machine; }
void write_event(Raul::BeatTime time,