Lines Matching refs:dcblock
11 struct dcblock { struct
20 struct dcblock *dcblock_new(float R, unsigned long sample_rate) in dcblock_new() argument
22 struct dcblock *dcblock = (struct dcblock *)calloc(1, sizeof(*dcblock)); in dcblock_new() local
23 dcblock->R = R; in dcblock_new()
24 dcblock->ramp_increment = 1000. / (float)(RAMP_TIME_MS * sample_rate); in dcblock_new()
25 return dcblock; in dcblock_new()
28 void dcblock_free(struct dcblock *dcblock) in dcblock_free() argument
30 free(dcblock); in dcblock_free()
34 void dcblock_process(struct dcblock *dcblock, float *data, int count) in dcblock_process() argument
37 float x_prev = dcblock->x_prev; in dcblock_process()
38 float y_prev = dcblock->y_prev; in dcblock_process()
39 float R = dcblock->R; in dcblock_process()
41 if (!dcblock->initialized) { in dcblock_process()
43 dcblock->initialized = 1; in dcblock_process()
59 if (dcblock->ramp_factor < 1.0) { in dcblock_process()
60 d *= dcblock->ramp_factor; in dcblock_process()
61 dcblock->ramp_factor += dcblock->ramp_increment; in dcblock_process()
66 dcblock->x_prev = x_prev; in dcblock_process()
67 dcblock->y_prev = y_prev; in dcblock_process()