Max Kellermann
953b258e5e
pcm_resample_fallback: corrected the sample calculation
...
Due to rounding errors, it was possible that the fallback resampler
returned partial frames.
2009-01-16 18:52:01 +01:00
Max Kellermann
2a83138913
pcm_resample: use pcm_buffer (1/2)
...
Return a temporary buffer from pcm_resample_*() and pcm_convert().
2009-01-08 00:46:38 +01:00
Max Kellermann
7f34e9410e
pcm: added pcm_convert_deinit(), pcm_resample_deinit()
...
Free memory allocated by libsamplerate when the output or the decoder
is closed.
2009-01-07 22:20:30 +01:00
Thomas Jansen
87751ddbd0
pcm_resample_fallback.c: replaced mpd_unused by G_GNUC_UNUSED
2008-11-24 14:44:17 +01:00
Max Kellermann
af7cb932fb
pcm_resample: implemented 24 bit resampling
...
Similar to pcm_resample_16(), implement pcm_resample_24(). The 24 bit
implementation is very similar, but it uses src_int_to_float_array()
instead of src_short_to_float_array() before sending data to
libsamplerate.
2008-10-23 20:02:51 +02:00
Max Kellermann
1dcb946fb0
pcm_resample: eliminated "sample" local variables
...
Copy from source to destination buffer directly, don't use the
temporary variables "lsample" and "rsample".
2008-10-23 20:01:37 +02:00
Max Kellermann
124f79a2a6
pcm_resample: don't resample partial samples
...
Added assertions which ensure that there are no partial samples in the
source buffer.
2008-10-23 20:01:12 +02:00
Max Kellermann
b13d656f81
pcm_resample: don't hard-code sample size
...
Use sizeof(sample) instead of hard-coding "2". Although we're in 16
bit right now, this will make code sharing easier when we support
other sample sizes.
2008-10-23 20:01:08 +02:00
Max Kellermann
6b1c54ef96
pcm_utils: moved code to pcm_resample.c
...
Separate the resampling code from the rest of pcm_utils.c. Create two
sub-libraries: pcm_resample_libsamplerate.c and
pcm_resample_fallback.c.
2008-10-23 20:00:51 +02:00