changable attack

This commit is contained in:
Kuba 2023-11-01 07:47:57 +00:00
parent 00fef1ab63
commit fe28322de8
3 changed files with 9 additions and 0 deletions

View File

@ -163,6 +163,12 @@ ResultAndArg poll_control_pipe() {
printf("\n");
resarg.res = CONTROL_PIPE_COMPRESSORDECAY_SET;
resarg.arg = arg;
} else if(fifo[0] == 'C' && fifo[1] == 'O' && fifo[2] == 'A') {
printf("Set Compressor Attack to ");
printf(arg);
printf("\n");
resarg.res = CONTROL_PIPE_COMPRESSORATTACK_SET;
resarg.arg = arg;
}
}
return resarg;

View File

@ -19,6 +19,7 @@
#define CONTROL_PIPE_STEREO_SET 12
#define CONTROL_PIPE_GAIN_SET 13
#define CONTROL_PIPE_COMPRESSORDECAY_SET 13
#define CONTROL_PIPE_COMPRESSORATTACK_SET 13
typedef struct {
int res;

View File

@ -203,6 +203,8 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
gaim = std::stof(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORDECAY_SET) {
compressor_decay = std::stof(pollResult.arg);
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORATTACK_SET) {
compressor_attack = std::stof(pollResult.arg);
}
}