mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-27 03:23:54 +01:00
remove polar stereo
fix
This commit is contained in:
@@ -40,7 +40,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
FM95_Volumes volumes;
|
||||
uint8_t stereo;
|
||||
bool stereo;
|
||||
|
||||
uint8_t rds_streams;
|
||||
|
||||
@@ -222,7 +222,7 @@ int run_fm95(const FM95_Config config, FM95_Runtime* runtime) {
|
||||
|
||||
mpx = stereo_encode(&runtime->stencode, config.stereo, l, r);
|
||||
|
||||
if(rds_on && config.stereo != 2) { // disable rds on polar stereo
|
||||
if(rds_on) {
|
||||
float rds_level = config.volumes.rds;
|
||||
for(uint8_t stream = 0; stream < config.rds_streams; stream++) {
|
||||
uint8_t osc_stream = 12 + stream;
|
||||
@@ -437,7 +437,7 @@ void init_runtime(FM95_Runtime* runtime, FM95_Config config, bool rds_on) {
|
||||
init_oscillator(&runtime->osc, (config.calibration == 2) ? 60 : 400, config.sample_rate);
|
||||
return;
|
||||
}
|
||||
else init_oscillator(&runtime->osc, (config.stereo == 2) ? 7812.5 : 4750, config.sample_rate);
|
||||
else init_oscillator(&runtime->osc, 4750, config.sample_rate);
|
||||
|
||||
if(config.lpf_cutoff != 0) {
|
||||
runtime->lpf_l = iirfilt_rrrf_create_prototype(LIQUID_IIRDES_CHEBY2, LIQUID_IIRDES_LOWPASS, LIQUID_IIRDES_SOS, config.lpf_order, (config.lpf_cutoff/config.sample_rate), 0.0f, 1.0f, 60.0f);
|
||||
@@ -456,7 +456,7 @@ void init_runtime(FM95_Runtime* runtime, FM95_Config config, bool rds_on) {
|
||||
|
||||
if(config.tilt != 0) tilt_init(&runtime->tilter, (float)config.tilt / 127.0f);
|
||||
|
||||
init_stereo_encoder(&runtime->stencode, 4.0f, &runtime->osc, (config.stereo == 2), config.volumes.mono, config.volumes.pilot, config.volumes.stereo);
|
||||
init_stereo_encoder(&runtime->stencode, 4.0f, &runtime->osc, config.volumes.mono, config.volumes.pilot, config.volumes.stereo);
|
||||
|
||||
if(config.agc_max != 0.0) {
|
||||
last_gain = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user