it just made it worse
This commit is contained in:
parent
99a5261480
commit
12e34fe9aa
|
|
@ -82,10 +82,6 @@ static volatile void *map_peripheral(uint32_t base, uint32_t len)
|
||||||
}
|
}
|
||||||
|
|
||||||
int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt, float ppm, char *control_pipe, int pty, int *af_array, int raw, int drds, double preemp, int power, int rawSampleRate, int rawChannels, int deviation, int ta, int tp, float cutoff_freq, float gaim, float compressor_decay, float compressor_attack, float compressor_max_gain_recip, int enablecompressor, int rds_ct_enabled, float rds_volume) {
|
int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt, float ppm, char *control_pipe, int pty, int *af_array, int raw, int drds, double preemp, int power, int rawSampleRate, int rawChannels, int deviation, int ta, int tp, float cutoff_freq, float gaim, float compressor_decay, float compressor_attack, float compressor_max_gain_recip, int enablecompressor, int rds_ct_enabled, float rds_volume) {
|
||||||
int stereo_on = 1;
|
|
||||||
int ct_on = rds_ct_enabled;
|
|
||||||
int rdsvol = 1;
|
|
||||||
int disablerds = drds;
|
|
||||||
// Catch all signals possible - it is vital we kill the DMA engine
|
// Catch all signals possible - it is vital we kill the DMA engine
|
||||||
// on process exit!
|
// on process exit!
|
||||||
// for (int i = 0; i < 64; i++) {
|
// for (int i = 0; i < 64; i++) {
|
||||||
|
|
@ -205,7 +201,7 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
|
||||||
if(pollResult.res == CONTROL_PIPE_PS_SET) {
|
if(pollResult.res == CONTROL_PIPE_PS_SET) {
|
||||||
varying_ps = 0;
|
varying_ps = 0;
|
||||||
} else if(pollResult.res == CONTROL_PIPE_RDS_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_RDS_SET) {
|
||||||
disablerds = std::stoi(pollResult.arg);
|
drds = std::stoi(pollResult.arg);
|
||||||
} else if(pollResult.res == CONTROL_PIPE_PWR_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_PWR_SET) {
|
||||||
pad_reg[GPIO_PAD_0_27] = 0x5a000018 + std::stoi(pollResult.arg);
|
pad_reg[GPIO_PAD_0_27] = 0x5a000018 + std::stoi(pollResult.arg);
|
||||||
pad_reg[GPIO_PAD_28_45] = 0x5a000018 + std::stoi(pollResult.arg);
|
pad_reg[GPIO_PAD_28_45] = 0x5a000018 + std::stoi(pollResult.arg);
|
||||||
|
|
@ -213,7 +209,7 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
|
||||||
deviation = std::stoi(pollResult.arg);
|
deviation = std::stoi(pollResult.arg);
|
||||||
deviation_scale_factor= 0.1 * (deviation );
|
deviation_scale_factor= 0.1 * (deviation );
|
||||||
} else if(pollResult.res == CONTROL_PIPE_STEREO_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_STEREO_SET) {
|
||||||
stereo_on = std::stoi(pollResult.arg);
|
disablestereo = std::stoi(pollResult.arg);
|
||||||
} else if(pollResult.res == CONTROL_PIPE_GAIN_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_GAIN_SET) {
|
||||||
gaim = std::stof(pollResult.arg);
|
gaim = std::stof(pollResult.arg);
|
||||||
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORDECAY_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORDECAY_SET) {
|
||||||
|
|
@ -221,13 +217,13 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
|
||||||
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORATTACK_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_COMPRESSORATTACK_SET) {
|
||||||
compressor_attack = std::stof(pollResult.arg);
|
compressor_attack = std::stof(pollResult.arg);
|
||||||
} else if(pollResult.res == CONTROL_PIPE_CT_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_CT_SET) {
|
||||||
ct_on = std::stoi(pollResult.arg);
|
rds_ct_enabled = std::stoi(pollResult.arg);
|
||||||
} else if(pollResult.res == CONTROL_PIPE_RDSVOL_SET) {
|
} else if(pollResult.res == CONTROL_PIPE_RDSVOL_SET) {
|
||||||
rdsvol = std::stof(pollResult.arg);
|
rds_volume = std::stof(pollResult.arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( fm_mpx_get_samples(data, disablerds, compressor_decay, compressor_attack, compressor_max_gain_recip, stereo_on, gaim, enablecompressor, ct_on, rdsvol) < 0 ) {
|
if( fm_mpx_get_samples(data, drds, compressor_decay, compressor_attack, compressor_max_gain_recip, disablestereo, gaim, enablecompressor, rds_ct_enabled, rds_volume) < 0 ) {
|
||||||
terminate(0);
|
terminate(0);
|
||||||
}
|
}
|
||||||
data_len = DATA_SIZE;
|
data_len = DATA_SIZE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue