Commit b69e3e4c authored by Georg Krause's avatar Georg Krause

Disable Tempo tapping in Free Record Mode

parent 7d217629
Pipeline #303 passed with stages
in 1 minute and 45 seconds
......@@ -111,7 +111,7 @@ public:
}
float alpha = 0.6;
if (mouseOver)
if (mouseOver && active())
alpha = 1;
if ( !greyedOut )
......@@ -121,6 +121,12 @@ public:
cairo_set_source_rgb( cr, grey, grey, grey );
}
if(active()) {
cairo_set_source_rgba(cr, _r, _g, _b, alpha);
} else {
cairo_set_source_rgba(cr, _r, _g, _b, 0.4);
}
if ( highlight && !greyedOut )
cairo_set_line_width(cr, 2.2);
cairo_stroke(cr);
......
......@@ -311,7 +311,8 @@ void handleDspEvents()
if ( availableRead >= sizeof(EventTimeTempoTap) ) {
EventTimeTempoTap ev;
jack_ringbuffer_read( rbToDsp, (char*)&ev, sizeof(EventTimeTempoTap) );
jack->getTimeManager()->tap();
if(!jack->getFreeRecMode())
jack->getTimeManager()->tap();
}
break;
}
......
......@@ -141,9 +141,12 @@ void handleGuiEvents()
jack_ringbuffer_read(rbToGui,
(char *)&e,
sizeof(EventFreeRecordMode));
gui->getMasterTrack()->setFreeRecMode(
GMasterTrack *gm =
gui->getMasterTrack();
gm->setFreeRecMode(
e.enable);
gui->getMasterTrack()->metronomeEnable(!e.enable);
gm->metronomeEnable(!e.enable);
gm->tapEnable(!e.enable);
}
break;
}
......
......@@ -377,6 +377,13 @@ void GMasterTrack::metronomeActivate(bool b) {
metronomeButton.value(b);
}
void GMasterTrack::tapEnable(bool b) {
if(b)
tapTempo.activate();
else
tapTempo.deactivate();
}
void
GMasterTrack::setClipLength(int l)
{
......
......@@ -63,6 +63,7 @@ public:
void
setClipLength(int l);
void setFreeRecMode(bool e);
void tapEnable(bool b);
Avtk::Volume* getInputVolume();
Avtk::Volume* getVolume();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment