refactor(config): rename SRC -> MIDI

This commit is contained in:
2025-11-01 18:35:00 +01:00
parent e7a5877b04
commit 78cf88de78
2 changed files with 63 additions and 63 deletions
+56 -56
View File
@@ -66,65 +66,65 @@ SELECT_FRAG_5=36
SELECT_FRAG_6=68
SELECT_FRAG_8=52
SRC_COUNT=3
MIDI_COUNT=3
SRC_1_ACTIVE_COUNT=2
SRC_1_ACTIVE_1=32
SRC_1_ACTIVE_2=64
SRC_1_COUNT=6
SRC_1_1_X=33
SRC_1_1_Y=49
SRC_1_1_Z=65
SRC_1_2_X=1
SRC_1_2_Y=17
SRC_1_2_Z=
SRC_1_3_X=34
SRC_1_3_Y=50
SRC_1_3_Z=66
SRC_1_4_X=2
SRC_1_4_Y=18
SRC_1_4_Z=
SRC_1_5_X=35
SRC_1_5_Y=51
SRC_1_5_Z=67
SRC_1_6_X=3
SRC_1_6_Y=19
SRC_1_6_Z=
MIDI_1_ACTIVE_COUNT=2
MIDI_1_ACTIVE_1=32
MIDI_1_ACTIVE_2=64
MIDI_1_COUNT=6
MIDI_1_1_X=33
MIDI_1_1_Y=49
MIDI_1_1_Z=65
MIDI_1_2_X=1
MIDI_1_2_Y=17
MIDI_1_2_Z=
MIDI_1_3_X=34
MIDI_1_3_Y=50
MIDI_1_3_Z=66
MIDI_1_4_X=2
MIDI_1_4_Y=18
MIDI_1_4_Z=
MIDI_1_5_X=35
MIDI_1_5_Y=51
MIDI_1_5_Z=67
MIDI_1_6_X=3
MIDI_1_6_Y=19
MIDI_1_6_Z=
SRC_2_ACTIVE_COUNT=3
SRC_2_ACTIVE_1=36
SRC_2_ACTIVE_2=68
SRC_2_ACTIVE_3=52
SRC_2_COUNT=7
SRC_2_1_X=37
SRC_2_1_Y=53
SRC_2_1_Z=69
SRC_2_2_X=5
SRC_2_2_Y=21
SRC_2_2_Z=
SRC_2_3_X=38
SRC_2_3_Y=54
SRC_2_3_Z=70
SRC_2_4_X=6
SRC_2_4_Y=22
SRC_2_4_Z=
SRC_2_5_X=39
SRC_2_5_Y=55
SRC_2_5_Z=71
SRC_2_6_X=7
SRC_2_6_Y=23
SRC_2_6_Z=
SRC_2_7_X=4
SRC_2_7_Y=20
SRC_2_7_Z=
MIDI_2_ACTIVE_COUNT=3
MIDI_2_ACTIVE_1=36
MIDI_2_ACTIVE_2=68
MIDI_2_ACTIVE_3=52
MIDI_2_COUNT=7
MIDI_2_1_X=37
MIDI_2_1_Y=53
MIDI_2_1_Z=69
MIDI_2_2_X=5
MIDI_2_2_Y=21
MIDI_2_2_Z=
MIDI_2_3_X=38
MIDI_2_3_Y=54
MIDI_2_3_Z=70
MIDI_2_4_X=6
MIDI_2_4_Y=22
MIDI_2_4_Z=
MIDI_2_5_X=39
MIDI_2_5_Y=55
MIDI_2_5_Z=71
MIDI_2_6_X=7
MIDI_2_6_Y=23
MIDI_2_6_Z=
MIDI_2_7_X=4
MIDI_2_7_Y=20
MIDI_2_7_Z=
SRC_3_COUNT=2
SRC_3_1_X=48
SRC_3_1_Y=58
SRC_3_1_Z=59
SRC_3_2_X=0
SRC_3_2_Y=16
SRC_3_2_Z=
MIDI_3_COUNT=2
MIDI_3_1_X=48
MIDI_3_1_Y=58
MIDI_3_1_Z=59
MIDI_3_2_X=0
MIDI_3_2_Y=16
MIDI_3_2_Z=
FADER_COUNT=16
FADER_1=0
+7 -7
View File
@@ -48,11 +48,11 @@ StateConfig state_parse_config(ConfigFile config) {
state_config.src_active_counts.length = state_config.src_counts.length =
state_config.src_active_offsets.length = state_config.src_offsets.length =
state_config.values_offsets.length =
config_file_get_int(config, "SRC_COUNT", 0);
config_file_get_int(config, "MIDI_COUNT", 0);
total = 0;
for (i = 0; i < state_config.src_active_counts.length; i++) {
sprintf(name, "SRC_%d_ACTIVE_COUNT", i + 1);
sprintf(name, "MIDI_%d_ACTIVE_COUNT", i + 1);
state_config.src_active_counts.values[i] =
config_file_get_int(config, name, 1);
state_config.src_active_offsets.values[i] = total;
@@ -63,7 +63,7 @@ StateConfig state_parse_config(ConfigFile config) {
for (i = 0; i < state_config.src_active_counts.length; i++) {
for (j = 0; j < state_config.src_active_counts.values[i]; j++) {
sprintf(name, "SRC_%d_ACTIVE_%d", i + 1, j + 1);
sprintf(name, "MIDI_%d_ACTIVE_%d", i + 1, j + 1);
state_config.src_active_codes
.values[state_config.src_active_offsets.values[i] + j] =
config_file_get_int(config, name, UNSET_MIDI_CODE);
@@ -73,7 +73,7 @@ StateConfig state_parse_config(ConfigFile config) {
total = 0;
offset = 0;
for (i = 0; i < state_config.src_counts.length; i++) {
sprintf(name, "SRC_%d_COUNT", i + 1);
sprintf(name, "MIDI_%d_COUNT", i + 1);
state_config.src_counts.values[i] = config_file_get_int(config, name, 0);
state_config.src_offsets.values[i] = total;
state_config.values_offsets.values[i] = offset;
@@ -87,15 +87,15 @@ StateConfig state_parse_config(ConfigFile config) {
for (i = 0; i < state_config.src_counts.length; i++) {
offset = state_config.src_offsets.values[i];
for (j = 0; j < state_config.src_counts.values[i]; j++) {
sprintf(name, "SRC_%d_%d_X", i + 1, j + 1);
sprintf(name, "MIDI_%d_%d_X", i + 1, j + 1);
state_config.src_codes.values[(offset + j) * 3] =
config_file_get_int(config, name, UNSET_MIDI_CODE);
sprintf(name, "SRC_%d_%d_Y", i + 1, j + 1);
sprintf(name, "MIDI_%d_%d_Y", i + 1, j + 1);
state_config.src_codes.values[(offset + j) * 3 + 1] =
config_file_get_int(config, name, UNSET_MIDI_CODE);
sprintf(name, "SRC_%d_%d_Z", i + 1, j + 1);
sprintf(name, "MIDI_%d_%d_Z", i + 1, j + 1);
state_config.src_codes.values[(offset + j) * 3 + 2] =
config_file_get_int(config, name, UNSET_MIDI_CODE);
}