0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 03:23:54 +01:00

make *2 for preemphasis out

This commit is contained in:
2025-01-24 18:07:32 +01:00
parent f5b6a12486
commit efd83adf39
5 changed files with 13 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
{
"port": 13452,
"time": 1737734479782,
"time": 1737738374932,
"version": "0.0.3"
}

View File

@@ -131,10 +131,10 @@ int main() {
#ifdef PREEMPHASIS
#ifdef LPF
float lowpassed = apply_low_pass_filter(&lpf, in);
float preemphasized = apply_pre_emphasis(&preemp, lowpassed);
float preemphasized = apply_pre_emphasis(&preemp, lowpassed)*2;
float current_input = hard_clip(preemphasized);
#else
float preemphasized = apply_pre_emphasis(&preemp, in);
float preemphasized = apply_pre_emphasis(&preemp, in)*2;
float current_input = hard_clip(preemphasized);
#endif
#else

View File

@@ -154,13 +154,13 @@ int main() {
#ifdef LPF
float lowpassed_left = apply_low_pass_filter(&lpf_l, l_in);
float lowpassed_right = apply_low_pass_filter(&lpf_r, r_in);
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left);
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right);
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left)*2;
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right)*2;
float current_left_input = hard_clip(preemphasized_left);
float current_right_input = hard_clip(preemphasized_right);
#else
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in);
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in);
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in)*2;
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in)*2;
float current_left_input = hard_clip(preemphasized_left);
float current_right_input = hard_clip(preemphasized_right);
#endif

View File

@@ -139,10 +139,10 @@ int main() {
#ifdef PREEMPHASIS
#ifdef LPF
float lowpassed = apply_low_pass_filter(&lpf, in);
float preemphasized = apply_pre_emphasis(&preemp, lowpassed);
float preemphasized = apply_pre_emphasis(&preemp, lowpassed)*2;
float current_input = hard_clip(preemphasized);
#else
float preemphasized = apply_pre_emphasis(&preemp, in);
float preemphasized = apply_pre_emphasis(&preemp, in)*2;
float current_input = hard_clip(preemphasized);
#endif
#else

View File

@@ -210,13 +210,13 @@ int main() {
#ifdef LPF
float lowpassed_left = apply_low_pass_filter(&lpf_l, l_in);
float lowpassed_right = apply_low_pass_filter(&lpf_r, r_in);
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left);
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right);
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left)*2;
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right)*2;
float current_left_input = hard_clip(preemphasized_left);
float current_right_input = hard_clip(preemphasized_right);
#else
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in);
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in);
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in)*2;
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in)*2;
float current_left_input = hard_clip(preemphasized_left);
float current_right_input = hard_clip(preemphasized_right);
#endif