Commit 7d217629 authored by Georg Krause's avatar Georg Krause

Disable Metronome in Free Record Mode

parent 994ead34
......@@ -232,7 +232,11 @@ void handleDspEvents()
if ( availableRead >= sizeof(EventMetronomeActive) ) {
EventMetronomeActive ev(false);
jack_ringbuffer_read( rbToDsp, (char*)&ev, sizeof(EventMetronomeActive) );
jack->getLogic()->metronomeEnable(ev.active);
if(!jack->getFreeRecMode()) {
jack->getLogic()
->metronomeEnable(
ev.active);
}
}
break;
}
......
......@@ -120,7 +120,7 @@ void handleGuiEvents()
if ( availableRead >= sizeof(EventMetronomeActive) ) {
EventMetronomeActive ev(false);
jack_ringbuffer_read( rbToGui, (char*)&ev, sizeof(EventMetronomeActive) );
gui->getMasterTrack()->metronomeEnable(ev.active);
gui->getMasterTrack()->metronomeActivate(ev.active);
}
break;
}
......@@ -143,6 +143,7 @@ void handleGuiEvents()
sizeof(EventFreeRecordMode));
gui->getMasterTrack()->setFreeRecMode(
e.enable);
gui->getMasterTrack()->metronomeEnable(!e.enable);
}
break;
}
......
......@@ -162,8 +162,7 @@ static void gmastertrack_button_callback(Fl_Widget *w, void *data)
writeToDspRingbuffer( &e );
} else {
Avtk::LightButton* b = (Avtk::LightButton*)w;
b->value( !b->value() );
EventMetronomeActive e = EventMetronomeActive( b->value() );
EventMetronomeActive e = EventMetronomeActive( !b->value() );
writeToDspRingbuffer( &e );
}
......@@ -367,9 +366,15 @@ void GMasterTrack::setInputToActive(int to, bool f)
inputToSidechainKey.value( f );
}
void GMasterTrack::metronomeEnable( bool b )
{
metronomeButton.value( b );
void GMasterTrack::metronomeEnable(bool b) {
if(b)
metronomeButton.activate();
else
metronomeButton.deactivate();
}
void GMasterTrack::metronomeActivate(bool b) {
metronomeButton.value(b);
}
void
......
......@@ -59,6 +59,7 @@ public:
void setInputToActive(int to, bool f);
void metronomeEnable( bool b );
void metronomeActivate(bool b);
void
setClipLength(int l);
void setFreeRecMode(bool e);
......
......@@ -790,4 +790,5 @@ void Jack::setFreeRecMode(bool e)
EventFreeRecordMode ev = EventFreeRecordMode(e);
writeToGuiRingbuffer(&ev);
getLogic()->metronomeEnable(false);
}
\ No newline at end of file
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