aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/emphasis.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-01-28 18:18:44 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:01:12 +0100
commitbd7ccc5fa05587606757adbacb6e1bf12f12fd2c (patch)
tree9c7e5262ece40789746d680ae704712b1d17bd3d /src/common/emphasis.c
parent71e556e7ffd9e470bde25158b42303eeb2355ff7 (diff)
Add global DC-Filter and remove all individual DC-Filters
Diffstat (limited to 'src/common/emphasis.c')
-rw-r--r--src/common/emphasis.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/emphasis.c b/src/common/emphasis.c
index 93c2b6f..524c37b 100644
--- a/src/common/emphasis.c
+++ b/src/common/emphasis.c
@@ -27,7 +27,7 @@
#define PI M_PI
-#define CUT_OFF_H 300.0 /* cut-off frequency for high-pass filters */
+#define CUT_OFF_H 100.0 /* cut-off frequency for high-pass filter */
static void gen_sine(double *samples, int num, int samplerate, double freq)
{
@@ -106,8 +106,6 @@ void de_emphasis(emphasis_t *state, double *samples, int num)
double x, y, y_last, factor, amp;
int i;
- filter_process(&state->d.hp, samples, num);
-
y_last = state->d.y_last;
factor = state->d.factor;
amp = state->d.amp;
@@ -126,3 +124,9 @@ void de_emphasis(emphasis_t *state, double *samples, int num)
state->d.y_last = y_last;
}
+/* high pass filter to remove DC and low frequencies */
+void dc_filter(emphasis_t *state, double *samples, int num)
+{
+ filter_process(&state->d.hp, samples, num);
+}
+