summaryrefslogtreecommitdiff
path: root/plugingui/humaniservisualiser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-07-18 16:46:13 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-07-18 16:46:13 +0200
commit04fc8205dc1cc471af9473162fdab48d0f39847b (patch)
tree9e8cd5c67928ae595d0c09e4f889d106626e18fa /plugingui/humaniservisualiser.cc
parenta0484778a9953dfd1948bf4dac71c51deab18cab (diff)
Store and use laidback setting in milliseconds.
Diffstat (limited to 'plugingui/humaniservisualiser.cc')
-rw-r--r--plugingui/humaniservisualiser.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugingui/humaniservisualiser.cc b/plugingui/humaniservisualiser.cc
index a823c64..fd643d4 100644
--- a/plugingui/humaniservisualiser.cc
+++ b/plugingui/humaniservisualiser.cc
@@ -66,8 +66,9 @@ HumaniserVisualiser::Canvas::Canvas(GUI::Widget* parent,
SettingsNotifier& settings_notifier)
: GUI::Widget(parent)
, settings_notifier(settings_notifier)
- , latency_max_samples(settings.latency_max.load() *
+ , latency_max_samples(settings.latency_max_ms.load() *
settings.samplerate.load() / 1000)
+ , settings(settings)
{
CONNECT(this, settings_notifier.enable_latency_modifier,
this, &HumaniserVisualiser::Canvas::latencyEnabledChanged);
@@ -81,7 +82,7 @@ HumaniserVisualiser::Canvas::Canvas(GUI::Widget* parent,
CONNECT(this, settings_notifier.latency_stddev,
this, &HumaniserVisualiser::Canvas::latencyStddevChanged);
- CONNECT(this, settings_notifier.latency_laid_back,
+ CONNECT(this, settings_notifier.latency_laid_back_ms,
this, &HumaniserVisualiser::Canvas::latencyLaidbackChanged);
CONNECT(this, settings_notifier.velocity_stddev,
this, &HumaniserVisualiser::Canvas::velocityStddevChanged);
@@ -185,9 +186,9 @@ void HumaniserVisualiser::Canvas::latencyStddevChanged(float stddev)
redraw();
}
-void HumaniserVisualiser::Canvas::latencyLaidbackChanged(int laidback)
+void HumaniserVisualiser::Canvas::latencyLaidbackChanged(float laidback_ms)
{
- this->laidback = laidback;
+ this->laidback = laidback_ms * settings.samplerate.load() / 1000;
redraw();
}