summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 528b542..5348324 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -51,6 +51,7 @@ DrumGizmo::DrumGizmo(AudioOutputEngine *o, AudioInputEngine *i)
, oe(o)
, ie(i)
, framesize(0)
+ , freewheel(false)
{
is_stopping = false;
cacheManager.init(1000, true); // start thread
@@ -189,6 +190,16 @@ void DrumGizmo::setFrameSize(size_t framesize)
}
}
+void DrumGizmo::setFreeWheel(bool freewheel)
+{
+ // Freewheel = true means that we are bouncing and therefore running faster
+ // than realtime.
+ if(freewheel != this->freewheel) {
+ this->freewheel = freewheel;
+ cacheManager.setAsyncMode(!freewheel);
+ }
+}
+
bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
{
setFrameSize(nsamples);