changable decay

This commit is contained in:
Kuba 2023-11-01 07:46:43 +00:00
parent 0235109fb3
commit 00fef1ab63
3 changed files with 9 additions and 0 deletions

View File

@ -157,6 +157,12 @@ ResultAndArg poll_control_pipe() {
if(!togg) printf("ON\n"); else printf("OFF\n");
resarg.res = CONTROL_PIPE_STEREO_SET;
resarg.arg = (char)togg;
} else if(fifo[0] == 'C' && fifo[1] == 'O' && fifo[2] == 'D') {
printf("Set Compressor Decay to ");
printf(arg);
printf("\n");
resarg.res = CONTROL_PIPE_COMPRESSORDECAY_SET;
resarg.arg = arg;
}
}
return resarg;

View File

@ -18,6 +18,7 @@
#define CONTROL_PIPE_DEVIATION_SET 11
#define CONTROL_PIPE_STEREO_SET 12
#define CONTROL_PIPE_GAIN_SET 13
#define CONTROL_PIPE_COMPRESSORDECAY_SET 13
typedef struct {
int res;

View File

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