This commit is contained in:
Kuba 2023-10-31 14:53:19 +00:00
parent f80ab90dd1
commit 1b11110a39
3 changed files with 9 additions and 0 deletions

View File

@ -145,6 +145,12 @@ ResultAndArg poll_control_pipe() {
printf("\n");
resarg.res = CONTROL_PIPE_DEVIATION_SET;
resarg.arg = arg;
else if(fifo[0] == 'G' && fifo[1] == 'A' && fifo[2] == 'I') {
printf("Set Gain to ");
printf(arg);
printf("\n");
resarg.res = CONTROL_PIPE_GAIN_SET;
resarg.arg = arg;
} else if(fifo[0] == 'S' && fifo[1] == 'T' && fifo[2] == 'R') {
int togg = ( strcmp(arg, "OFF") == 0 );
printf("Set Stereo Toggle to ");

View File

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

View File

@ -199,6 +199,8 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
deviation_scale_factor= 0.1 * (deviation );
} else if(pollResult.res == CONTROL_PIPE_STEREO_SET) {
disablestereo = (int)pollResult.arg;
} else if(pollResult.res == CONTROL_PIPE_GAIN_SET) {
gaim = (float)pollResult.arg;
}
}