pcm: drop compatibility with libsamplerate older than 0.1.3
Remove compatibility code.
This commit is contained in:
parent
af4133e3c9
commit
e504913b0f
10
configure.ac
10
configure.ac
@ -748,20 +748,12 @@ dnl Converter Plugins
|
|||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
dnl ------------------------------ libsamplerate ------------------------------
|
dnl ------------------------------ libsamplerate ------------------------------
|
||||||
MPD_AUTO_PKG(lsr, SAMPLERATE, [samplerate >= 0.0.15],
|
MPD_AUTO_PKG(lsr, SAMPLERATE, [samplerate >= 0.1.3],
|
||||||
[libsamplerate resampling], [libsamplerate not found])
|
[libsamplerate resampling], [libsamplerate not found])
|
||||||
if test x$enable_lsr = xyes; then
|
if test x$enable_lsr = xyes; then
|
||||||
AC_DEFINE([HAVE_LIBSAMPLERATE], 1,
|
AC_DEFINE([HAVE_LIBSAMPLERATE], 1,
|
||||||
[Define to enable libsamplerate])
|
[Define to enable libsamplerate])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$enable_lsr = xyes; then
|
|
||||||
PKG_CHECK_MODULES([SAMPLERATE_013],
|
|
||||||
[samplerate >= 0.1.3],,
|
|
||||||
[AC_DEFINE([HAVE_LIBSAMPLERATE_NOINT], 1,
|
|
||||||
[libsamplerate doesn't provide src_int_to_float_array() (<0.1.3)])])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_LIBSAMPLERATE, test x$enable_lsr = xyes)
|
AM_CONDITIONAL(HAVE_LIBSAMPLERATE, test x$enable_lsr = xyes)
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
@ -225,26 +225,6 @@ pcm_resample_lsr_16(PcmResampler *state,
|
|||||||
return dest_buffer;
|
return dest_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBSAMPLERATE_NOINT
|
|
||||||
|
|
||||||
/* libsamplerate introduced these functions in v0.1.3 */
|
|
||||||
|
|
||||||
static void
|
|
||||||
src_int_to_float_array(const int *in, float *out, int len)
|
|
||||||
{
|
|
||||||
while (len-- > 0)
|
|
||||||
*out++ = *in++ / (float)(1 << (24 - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
src_float_to_int_array (const float *in, int *out, int len)
|
|
||||||
{
|
|
||||||
while (len-- > 0)
|
|
||||||
*out++ = *in++ * (float)(1 << (24 - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const int32_t *
|
const int32_t *
|
||||||
pcm_resample_lsr_32(PcmResampler *state,
|
pcm_resample_lsr_32(PcmResampler *state,
|
||||||
unsigned channels,
|
unsigned channels,
|
||||||
|
Loading…
Reference in New Issue
Block a user