diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2016-04-17 15:17:38 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2016-04-17 16:49:39 +0200 |
commit | 9de121109db5ca60462d35e4e45b7e5219f28503 (patch) | |
tree | e0aaf1d5ce770b5f0a5494b3319b4aa00ea32bbb /src/common/samplerate.h | |
parent | 05402283dfd4da630c254cd1e3852ac3900abd3e (diff) |
common code: Sample rate conversion now supports any rate above 8000 Hz
Diffstat (limited to 'src/common/samplerate.h')
-rw-r--r-- | src/common/samplerate.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/samplerate.h b/src/common/samplerate.h index 6290441..db9bd8d 100644 --- a/src/common/samplerate.h +++ b/src/common/samplerate.h @@ -1,10 +1,10 @@ #include "filter.h" typedef struct samplerate { - int factor; + double factor; struct { double sum; - int sum_count; + double sum_count; biquad_low_pass_t bq; } down; struct { @@ -13,6 +13,6 @@ typedef struct samplerate { } up; } samplerate_t; -int init_samplerate(samplerate_t *state, int samplerate); +int init_samplerate(samplerate_t *state, double samplerate); int samplerate_downsample(samplerate_t *state, int16_t *input, int input_num, int16_t *output); int samplerate_upsample(samplerate_t *state, int16_t *input, int input_num, int16_t *output); |