From 85277515058b0aea5a2c844c090e39575d039c03 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sun, 24 Dec 2023 22:01:34 +0100 Subject: [PATCH] fix --- src/pifmrds/pi_fm_rds.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pifmrds/pi_fm_rds.cpp b/src/pifmrds/pi_fm_rds.cpp index 820118e..7e15e60 100644 --- a/src/pifmrds/pi_fm_rds.cpp +++ b/src/pifmrds/pi_fm_rds.cpp @@ -73,6 +73,7 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt, int data_index = 0; int generate_multiplex = 1; + int gen_stereo = !disablestereo; //set the power padgpio gpiopad; @@ -172,7 +173,7 @@ int tx(uint32_t carrier_freq, char *audio_file, uint16_t pi, char *ps, char *rt, deviation = std::stoi(pollResult.arg); deviation_scale_factor= 0.1 * (deviation ); } else if(pollResult.res == CONTROL_PIPE_STEREO_SET) { - disablestereo = pollResult.arg_int; + gen_stereo = !pollResult.arg_int; } else if(pollResult.res == CONTROL_PIPE_GAIN_SET) { gaim = std::stof(pollResult.arg); } else if(pollResult.res == CONTROL_PIPE_COMPRESSORDECAY_SET) { @@ -192,7 +193,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, rds_volume, paused, pilot_volume, generate_multiplex) < 0 ) { + if( fm_mpx_get_samples(data, drds, compressor_decay, compressor_attack, compressor_max_gain_recip, gen_stereo, gaim, enablecompressor, rds_ct_enabled, rds_volume, paused, pilot_volume, generate_multiplex) < 0 ) { terminate(0); } data_len = DATA_SIZE;