aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina/Driver.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/machina/Driver.hpp')
-rw-r--r--src/engine/machina/Driver.hpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/engine/machina/Driver.hpp b/src/engine/machina/Driver.hpp
index f21bb07..d913741 100644
--- a/src/engine/machina/Driver.hpp
+++ b/src/engine/machina/Driver.hpp
@@ -17,9 +17,6 @@
#ifndef MACHINA_DRIVER_HPP
#define MACHINA_DRIVER_HPP
-#include <atomic>
-
-#include "raul/DoubleBuffer.hpp"
#include "raul/RingBuffer.hpp"
#include "machina/types.hpp"
@@ -63,8 +60,8 @@ public:
_updates = b;
}
- virtual void set_bpm(double bpm) { _bpm.set(bpm); }
- virtual void set_quantization(double q) { _quantization.set(q); }
+ virtual void set_bpm(double bpm) { _bpm = bpm; }
+ virtual void set_quantization(double q) { _quantization = q; }
virtual void set_quantize_record(bool q) { _quantize_record = q; }
virtual void set_play_state(PlayState state) { _play_state = state; }
@@ -72,16 +69,16 @@ public:
virtual void activate() {}
virtual void deactivate() {}
- PlayState play_state() const { return _play_state.load(); }
+ PlayState play_state() const { return _play_state; }
protected:
- Raul::Forge& _forge;
- SPtr<Machine> _machine;
- SPtr<Raul::RingBuffer> _updates;
- std::atomic<PlayState> _play_state;
- Raul::DoubleBuffer<double> _bpm;
- Raul::DoubleBuffer<double> _quantization;
- bool _quantize_record;
+ Raul::Forge& _forge;
+ SPtr<Machine> _machine;
+ SPtr<Raul::RingBuffer> _updates;
+ PlayState _play_state;
+ double _bpm;
+ double _quantization;
+ bool _quantize_record;
};
} // namespace machina