mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-27 11:33:54 +01:00
make *2 for preemphasis out
This commit is contained in:
2
.vscode/.server-controller-port.log
vendored
2
.vscode/.server-controller-port.log
vendored
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"port": 13452,
|
"port": 13452,
|
||||||
"time": 1737734479782,
|
"time": 1737738374932,
|
||||||
"version": "0.0.3"
|
"version": "0.0.3"
|
||||||
}
|
}
|
||||||
@@ -131,10 +131,10 @@ int main() {
|
|||||||
#ifdef PREEMPHASIS
|
#ifdef PREEMPHASIS
|
||||||
#ifdef LPF
|
#ifdef LPF
|
||||||
float lowpassed = apply_low_pass_filter(&lpf, in);
|
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);
|
float current_input = hard_clip(preemphasized);
|
||||||
#else
|
#else
|
||||||
float preemphasized = apply_pre_emphasis(&preemp, in);
|
float preemphasized = apply_pre_emphasis(&preemp, in)*2;
|
||||||
float current_input = hard_clip(preemphasized);
|
float current_input = hard_clip(preemphasized);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -154,13 +154,13 @@ int main() {
|
|||||||
#ifdef LPF
|
#ifdef LPF
|
||||||
float lowpassed_left = apply_low_pass_filter(&lpf_l, l_in);
|
float lowpassed_left = apply_low_pass_filter(&lpf_l, l_in);
|
||||||
float lowpassed_right = apply_low_pass_filter(&lpf_r, r_in);
|
float lowpassed_right = apply_low_pass_filter(&lpf_r, r_in);
|
||||||
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left);
|
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left)*2;
|
||||||
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right);
|
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right)*2;
|
||||||
float current_left_input = hard_clip(preemphasized_left);
|
float current_left_input = hard_clip(preemphasized_left);
|
||||||
float current_right_input = hard_clip(preemphasized_right);
|
float current_right_input = hard_clip(preemphasized_right);
|
||||||
#else
|
#else
|
||||||
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in);
|
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in)*2;
|
||||||
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in);
|
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in)*2;
|
||||||
float current_left_input = hard_clip(preemphasized_left);
|
float current_left_input = hard_clip(preemphasized_left);
|
||||||
float current_right_input = hard_clip(preemphasized_right);
|
float current_right_input = hard_clip(preemphasized_right);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -139,10 +139,10 @@ int main() {
|
|||||||
#ifdef PREEMPHASIS
|
#ifdef PREEMPHASIS
|
||||||
#ifdef LPF
|
#ifdef LPF
|
||||||
float lowpassed = apply_low_pass_filter(&lpf, in);
|
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);
|
float current_input = hard_clip(preemphasized);
|
||||||
#else
|
#else
|
||||||
float preemphasized = apply_pre_emphasis(&preemp, in);
|
float preemphasized = apply_pre_emphasis(&preemp, in)*2;
|
||||||
float current_input = hard_clip(preemphasized);
|
float current_input = hard_clip(preemphasized);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -210,13 +210,13 @@ int main() {
|
|||||||
#ifdef LPF
|
#ifdef LPF
|
||||||
float lowpassed_left = apply_low_pass_filter(&lpf_l, l_in);
|
float lowpassed_left = apply_low_pass_filter(&lpf_l, l_in);
|
||||||
float lowpassed_right = apply_low_pass_filter(&lpf_r, r_in);
|
float lowpassed_right = apply_low_pass_filter(&lpf_r, r_in);
|
||||||
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left);
|
float preemphasized_left = apply_pre_emphasis(&preemp_l, lowpassed_left)*2;
|
||||||
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right);
|
float preemphasized_right = apply_pre_emphasis(&preemp_r, lowpassed_right)*2;
|
||||||
float current_left_input = hard_clip(preemphasized_left);
|
float current_left_input = hard_clip(preemphasized_left);
|
||||||
float current_right_input = hard_clip(preemphasized_right);
|
float current_right_input = hard_clip(preemphasized_right);
|
||||||
#else
|
#else
|
||||||
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in);
|
float preemphasized_left = apply_pre_emphasis(&preemp_l, l_in)*2;
|
||||||
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in);
|
float preemphasized_right = apply_pre_emphasis(&preemp_r, r_in)*2;
|
||||||
float current_left_input = hard_clip(preemphasized_left);
|
float current_left_input = hard_clip(preemphasized_left);
|
||||||
float current_right_input = hard_clip(preemphasized_right);
|
float current_right_input = hard_clip(preemphasized_right);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user