You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
550 B
25 lines
550 B
![]()
6 years ago
|
#include "../libfilter/iir_filter.h"
|
||
|
|
||
![]()
7 years ago
|
typedef struct emphasis {
|
||
|
struct {
|
||
![]()
6 years ago
|
iir_filter_t lp;
|
||
![]()
7 years ago
|
double x_last;
|
||
![]()
7 years ago
|
double factor;
|
||
|
double amp;
|
||
|
} p;
|
||
|
struct {
|
||
![]()
6 years ago
|
iir_filter_t hp;
|
||
![]()
7 years ago
|
double y_last;
|
||
![]()
6 years ago
|
double factor;
|
||
![]()
7 years ago
|
double amp;
|
||
|
} d;
|
||
|
} emphasis_t;
|
||
|
|
||
![]()
6 years ago
|
#define CUT_OFF_EMPHASIS_DEFAULT 300.0
|
||
![]()
7 years ago
|
|
||
|
int init_emphasis(emphasis_t *state, int samplerate, double cut_off);
|
||
![]()
6 years ago
|
void pre_emphasis(emphasis_t *state, sample_t *samples, int num);
|
||
|
void de_emphasis(emphasis_t *state, sample_t *samples, int num);
|
||
|
void dc_filter(emphasis_t *state, sample_t *samples, int num);
|
||
![]()
7 years ago
|
|