From 725e48fce4e4ad08a2a9aa0a64c3e79df5636108 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 8 Oct 2011 13:41:39 +0200 Subject: pcm_resample: add function pcm_resample_float() A version of the resampler that doesn't need int->float->int conversion. --- src/pcm_resample.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/pcm_resample.h') diff --git a/src/pcm_resample.h b/src/pcm_resample.h index 73f98ec01..24fa1d044 100644 --- a/src/pcm_resample.h +++ b/src/pcm_resample.h @@ -68,6 +68,26 @@ void pcm_resample_init(struct pcm_resample_state *state); */ void pcm_resample_deinit(struct pcm_resample_state *state); +/** + * Resamples 32 bit float data. + * + * @param state an initialized pcm_resample_state object + * @param channels the number of channels + * @param src_rate the source sample rate + * @param src the source PCM buffer + * @param src_size the size of #src in bytes + * @param dest_rate the requested destination sample rate + * @param dest_size_r returns the number of bytes of the destination buffer + * @return the destination buffer + */ +const float * +pcm_resample_float(struct pcm_resample_state *state, + unsigned channels, + unsigned src_rate, + const float *src_buffer, size_t src_size, + unsigned dest_rate, size_t *dest_size_r, + GError **error_r); + /** * Resamples 16 bit PCM data. * -- cgit v1.2.3