more rds volume

This commit is contained in:
Kuba 2023-11-03 10:23:48 +00:00
parent 5c0e406dfb
commit c343cb12c8
3 changed files with 4 additions and 4 deletions

View File

@ -193,9 +193,9 @@ int fm_mpx_open(char *filename, size_t len, int raw, double preemphasis, int raw
// samples provided by this function are in 0..10: they need to be divided by
// 10 after.
int fm_mpx_get_samples(float *mpx_buffer, int drds, float compressor_decay, float compressor_attack, float compressor_max_gain_recip, int disablestereo, float gain, int enablecompressor, int rds_ct_enabled) {
int fm_mpx_get_samples(float *mpx_buffer, int drds, float compressor_decay, float compressor_attack, float compressor_max_gain_recip, int disablestereo, float gain, int enablecompressor, int rds_ct_enabled, float rds_volume) {
int stereo_capable = (channels > 1) && (!disablestereo); //chatgpt
if(!drds) get_rds_samples(mpx_buffer, length, stereo_capable, rds_ct_enabled, 1.0);
if(!drds) get_rds_samples(mpx_buffer, length, stereo_capable, rds_ct_enabled, rds_volume);
if(inf == NULL) return 0; // if there is no audio, stop here

View File

@ -22,5 +22,5 @@
*/
extern int fm_mpx_open(char *filename, size_t len, int raw, double preemphasis, int rawSampleRate, int rawChannels, float cutoff_freq);
extern int fm_mpx_get_samples(float *mpx_buffer, int drds, float compressor_decay, float compressor_attack, float compressor_max_gain_recip, int disablestereo, float gain, int enablecompressor, int rds_ct_enabled);
extern int fm_mpx_get_samples(float *mpx_buffer, int drds, float compressor_decay, float compressor_attack, float compressor_max_gain_recip, int disablestereo, float gain, int enablecompressor, int rds_ct_enabled float rds_volume);
extern int fm_mpx_close();

View File

@ -220,7 +220,7 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt,
}
}
if( fm_mpx_get_samples(data, drds, compressor_decay, compressor_attack, compressor_max_gain_recip, disablestereo, gaim, enablecompressor, rds_ct_enabled) < 0 ) {
if( fm_mpx_get_samples(data, drds, compressor_decay, compressor_attack, compressor_max_gain_recip, disablestereo, gaim, enablecompressor, rds_ct_enabled, 1.0) < 0 ) {
terminate(0);
}
data_len = DATA_SIZE;