mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-29 15:59:14 +02:00
better tilt correction
This commit is contained in:
+4
-4
@@ -51,7 +51,7 @@ typedef struct
|
|||||||
|
|
||||||
float clipper_threshold;
|
float clipper_threshold;
|
||||||
uint8_t preemphasis;
|
uint8_t preemphasis;
|
||||||
int8_t tilt;
|
float tilt;
|
||||||
uint8_t calibration;
|
uint8_t calibration;
|
||||||
float mpx_power;
|
float mpx_power;
|
||||||
float mpx_deviation;
|
float mpx_deviation;
|
||||||
@@ -329,7 +329,7 @@ static int config_handler(void* user, const char* section, const char* name, con
|
|||||||
} else if (MATCH("fm95", "deviation")) {
|
} else if (MATCH("fm95", "deviation")) {
|
||||||
pconfig->audio_deviation = strtof(value, NULL);
|
pconfig->audio_deviation = strtof(value, NULL);
|
||||||
} else if(MATCH("fm95", "tilt")) {
|
} else if(MATCH("fm95", "tilt")) {
|
||||||
pconfig->tilt = strtof(value, NULL) * 127.0f;
|
pconfig->tilt = strtof(value, NULL);
|
||||||
} else if(MATCH("fm95", "bs412_max")) {
|
} else if(MATCH("fm95", "bs412_max")) {
|
||||||
pconfig->bs412_max = strtof(value, NULL);
|
pconfig->bs412_max = strtof(value, NULL);
|
||||||
} else if(MATCH("fm95", "agc_target")) {
|
} else if(MATCH("fm95", "agc_target")) {
|
||||||
@@ -459,7 +459,7 @@ void init_runtime(FM95_Runtime* runtime, const FM95_Config config) {
|
|||||||
init_bs412(&runtime->bs412, config.mpx_deviation, config.mpx_power, config.bs412_attack, config.bs412_release, config.bs412_max, config.sample_rate);
|
init_bs412(&runtime->bs412, config.mpx_deviation, config.mpx_power, config.bs412_attack, config.bs412_release, config.bs412_max, config.sample_rate);
|
||||||
runtime->bs412.gain = last_gain;
|
runtime->bs412.gain = last_gain;
|
||||||
|
|
||||||
if(config.tilt != 0) tilt_init(&runtime->tilter, (float)config.tilt / 127.0f);
|
if(config.tilt != 0) tilt_init(&runtime->tilter, config.tilt, config.sample_rate);
|
||||||
|
|
||||||
init_stereo_encoder(&runtime->stencode, 4.0f, &runtime->osc, config.volumes.audio, config.volumes.pilot);
|
init_stereo_encoder(&runtime->stencode, 4.0f, &runtime->osc, config.volumes.audio, config.volumes.pilot);
|
||||||
|
|
||||||
@@ -589,4 +589,4 @@ int main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user