-Fixed #76 Metro disable by MIDI mapping

main
Harry van Haaren 2014-08-30 16:57:12 +01:00
parent d4f74b6c45
commit 8835947f1e
2 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,9 @@
-> Fixed metronome MIDI mapping
-> Added metronome volume
1.0.1: Saturday 30th August 2014
-> Updated header graphics
-> CLang static analysis
-> Icon updated & shows

View File

@ -842,8 +842,14 @@ Binding* GenericMIDI::setupBinding( cJSON* binding )
tmp->data = dataJson->valueint;
// gets the Action type from the JSON string
tmp->action = Event::getTypeFromName( actionJson->valuestring );
cJSON* activeJson = cJSON_GetObjectItem( binding, "active" );
if ( activeJson )
{
tmp->active = activeJson->valueint;
}
// gets the active bool from the JSON
tmp->action = Event::getTypeFromName( actionJson->valuestring );
// check what our send value should be:
cJSON* sendJson = cJSON_GetObjectItem( binding, "send" );
@ -908,6 +914,7 @@ Binding* GenericMIDI::setupBinding( cJSON* binding )
}
else if ( strcmp( actionJson->valuestring, "metronome:active" ) == 0 ) {
tmp->action = Event::METRONOME_ACTIVE;
LUPPP_NOTE("binding metro active event, tmp->active == %i", tmp->active );
}
// check for valid event: otherwise pass