diff options
author | Max Kellermann <max@duempel.org> | 2011-10-08 13:41:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-10-20 02:24:25 +0200 |
commit | 725e48fce4e4ad08a2a9aa0a64c3e79df5636108 (patch) | |
tree | 48c95e6a1ce0fd0a4b6c3b4e08218e2cbceb357b /src/pcm_resample.h | |
parent | 43816c268ba71b0946986f28146213aac99c9872 (diff) | |
download | mpd-725e48fce4e4ad08a2a9aa0a64c3e79df5636108.tar.gz mpd-725e48fce4e4ad08a2a9aa0a64c3e79df5636108.tar.xz mpd-725e48fce4e4ad08a2a9aa0a64c3e79df5636108.zip |
pcm_resample: add function pcm_resample_float()
A version of the resampler that doesn't need int->float->int
conversion.
Diffstat (limited to '')
-rw-r--r-- | src/pcm_resample.h | 20 |
1 files changed, 20 insertions, 0 deletions
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 @@ -69,6 +69,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. * * @param state an initialized pcm_resample_state object |