From 2ab01419f334b834710a41fd26a538df3522cf49 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 4 Dec 2007 23:03:45 +0000 Subject: Fix stuck notes on stop. git-svn-id: http://svn.drobilla.net/lad/machina@948 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/machina/Driver.hpp | 2 +- src/engine/machina/JackDriver.hpp | 5 ++++- src/engine/machina/Machine.hpp | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/engine/machina') 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 #include #include +#include #include #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 _bpm; Raul::DoubleBuffer _quantization; + Raul::Command _stop; + Raul::TickTime _record_time; Raul::AtomicInt _recording; SharedPtr _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 pending_learn() { return _pending_learn; } void clear_pending_learn() { _pending_learn.reset(); } -- cgit v1.2.1