aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_resample_libsamplerate.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-03-01 00:59:53 +0100
committerMax Kellermann <max@duempel.org>2012-03-01 00:59:53 +0100
commit3b565b5f972ad65ab3e498c29eaf4f825eacece4 (patch)
tree174eaba9a3e5f1d79975eb388dc0831808f9027e /src/pcm_resample_libsamplerate.c
parent07429761382dc2dfc277bacf8b897a0d51402ab8 (diff)
downloadmpd-3b565b5f972ad65ab3e498c29eaf4f825eacece4.tar.gz
mpd-3b565b5f972ad65ab3e498c29eaf4f825eacece4.tar.xz
mpd-3b565b5f972ad65ab3e498c29eaf4f825eacece4.zip
pcm_convert: add method _reset()
Resets the libsamplerate state. Not being used yet.
Diffstat (limited to 'src/pcm_resample_libsamplerate.c')
-rw-r--r--src/pcm_resample_libsamplerate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pcm_resample_libsamplerate.c b/src/pcm_resample_libsamplerate.c
index c1b1760a9..f957e5155 100644
--- a/src/pcm_resample_libsamplerate.c
+++ b/src/pcm_resample_libsamplerate.c
@@ -104,6 +104,13 @@ pcm_resample_lsr_deinit(struct pcm_resample_state *state)
pcm_buffer_deinit(&state->buffer);
}
+void
+pcm_resample_lsr_reset(struct pcm_resample_state *state)
+{
+ if (state->state != NULL)
+ src_reset(state->state);
+}
+
static bool
pcm_resample_set(struct pcm_resample_state *state,
unsigned channels, unsigned src_rate, unsigned dest_rate,