diff options
author | Max Kellermann <max@duempel.org> | 2011-10-08 12:40:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-10-08 13:32:29 +0200 |
commit | 14424281a0e1407ca04ef05a50541a4178f70e91 (patch) | |
tree | 1e499d063b925ac2dff0ef27db253ba42ba04367 /src/pcm_resample.c | |
parent | 2b3fd0d4d34be365e44fd53b3bf3c72f8b0a69ea (diff) | |
download | mpd-14424281a0e1407ca04ef05a50541a4178f70e91.tar.gz mpd-14424281a0e1407ca04ef05a50541a4178f70e91.tar.xz mpd-14424281a0e1407ca04ef05a50541a4178f70e91.zip |
pcm_resample: add internal function _lsr_init()
Let the libsamplerate code initialize itself.
Diffstat (limited to 'src/pcm_resample.c')
-rw-r--r-- | src/pcm_resample.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/pcm_resample.c b/src/pcm_resample.c index ce75325a8..d4b117c56 100644 --- a/src/pcm_resample.c +++ b/src/pcm_resample.c @@ -58,16 +58,12 @@ pcm_resample_global_init(GError **error_r) void pcm_resample_init(struct pcm_resample_state *state) { - memset(state, 0, sizeof(*state)); - #ifdef HAVE_LIBSAMPLERATE - if (pcm_resample_lsr_enabled()) { - pcm_buffer_init(&state->in); - pcm_buffer_init(&state->out); - } + if (pcm_resample_lsr_enabled()) + pcm_resample_lsr_init(state); + else #endif - - pcm_buffer_init(&state->buffer); + pcm_resample_fallback_init(state); } void pcm_resample_deinit(struct pcm_resample_state *state) |