aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-12-04 23:03:45 +0000
committerDavid Robillard <d@drobilla.net>2007-12-04 23:03:45 +0000
commit2ab01419f334b834710a41fd26a538df3522cf49 (patch)
treebd1c1f1662797d9ca50f9bd8eddb1b44908d1e37 /src/engine/machina
parent1760218d029892fc9ba3b25e06479cce319f20a0 (diff)
downloadmachina-2ab01419f334b834710a41fd26a538df3522cf49.tar.gz
machina-2ab01419f334b834710a41fd26a538df3522cf49.tar.bz2
machina-2ab01419f334b834710a41fd26a538df3522cf49.zip
Fix stuck notes on stop.
git-svn-id: http://svn.drobilla.net/lad/machina@948 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina')
-rw-r--r--src/engine/machina/Driver.hpp2
-rw-r--r--src/engine/machina/JackDriver.hpp5
-rw-r--r--src/engine/machina/Machine.hpp4
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(); }