diff options
Diffstat (limited to 'src/engine/machina')
-rw-r--r-- | src/engine/machina/Driver.hpp | 2 | ||||
-rw-r--r-- | src/engine/machina/JackDriver.hpp | 5 | ||||
-rw-r--r-- | src/engine/machina/Machine.hpp | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/engine/machina/Driver.hpp b/src/engine/machina/Driver.hpp index 098cb0a..e497356 100644 --- a/src/engine/machina/Driver.hpp +++ b/src/engine/machina/Driver.hpp @@ -39,7 +39,7 @@ public: virtual void activate() {} virtual void deactivate() {} - virtual void reset() {} + virtual void stop() {} virtual bool recording() { return false; } virtual void start_record() {} diff --git a/src/engine/machina/JackDriver.hpp b/src/engine/machina/JackDriver.hpp index 72f8dfd..017d867 100644 --- a/src/engine/machina/JackDriver.hpp +++ b/src/engine/machina/JackDriver.hpp @@ -24,6 +24,7 @@ #include <raul/DoubleBuffer.hpp> #include <raul/StampedChunkRingBuffer.hpp> #include <raul/Semaphore.hpp> +#include <raul/Command.hpp> #include <jack/midiport.h> #include "Machine.hpp" #include "Driver.hpp" @@ -62,7 +63,7 @@ public: void set_bpm(double bpm) { _bpm.set(bpm); } void set_quantization(double quantization) { _quantization.set(quantization); } - void reset(); + void stop(); bool recording() { return _recording.get(); } void start_record(); @@ -85,6 +86,8 @@ private: Raul::DoubleBuffer<double> _bpm; Raul::DoubleBuffer<double> _quantization; + Raul::Command _stop; + Raul::TickTime _record_time; Raul::AtomicInt _recording; SharedPtr<Recorder> _recorder; diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp index c6f8796..c63537d 100644 --- a/src/engine/machina/Machine.hpp +++ b/src/engine/machina/Machine.hpp @@ -50,11 +50,11 @@ public: void write_state(Redland::Model& model); // Audio context - void reset(); + void reset(Raul::BeatTime time); BeatCount run(const Raul::TimeSlice& time); // Any context - Raul::BeatTime time() { return _time; } + inline Raul::BeatTime time() const { return _time; } SharedPtr<LearnRequest> pending_learn() { return _pending_learn; } void clear_pending_learn() { _pending_learn.reset(); } |