pcm/Dither: rename DitherShift() to DitherConvert()
This commit is contained in:
parent
1ad52f131c
commit
d1b7473418
@ -64,7 +64,7 @@ PcmDither::Dither(T sample)
|
|||||||
|
|
||||||
template<typename ST, typename DT>
|
template<typename ST, typename DT>
|
||||||
inline typename DT::value_type
|
inline typename DT::value_type
|
||||||
PcmDither::DitherShift(typename ST::value_type sample)
|
PcmDither::DitherConvert(typename ST::value_type sample)
|
||||||
{
|
{
|
||||||
static_assert(ST::BITS > DT::BITS,
|
static_assert(ST::BITS > DT::BITS,
|
||||||
"Sample formats cannot be dithered");
|
"Sample formats cannot be dithered");
|
||||||
@ -77,12 +77,12 @@ PcmDither::DitherShift(typename ST::value_type sample)
|
|||||||
|
|
||||||
template<typename ST, typename DT>
|
template<typename ST, typename DT>
|
||||||
inline void
|
inline void
|
||||||
PcmDither::DitherShift(typename DT::pointer_type dest,
|
PcmDither::DitherConvert(typename DT::pointer_type dest,
|
||||||
typename ST::const_pointer_type src,
|
typename ST::const_pointer_type src,
|
||||||
typename ST::const_pointer_type src_end)
|
typename ST::const_pointer_type src_end)
|
||||||
{
|
{
|
||||||
while (src < src_end)
|
while (src < src_end)
|
||||||
*dest++ = DitherShift<ST, DT>(*src++);
|
*dest++ = DitherConvert<ST, DT>(*src++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -91,7 +91,7 @@ PcmDither::Dither24To16(int16_t *dest, const int32_t *src,
|
|||||||
{
|
{
|
||||||
typedef SampleTraits<SampleFormat::S24_P32> ST;
|
typedef SampleTraits<SampleFormat::S24_P32> ST;
|
||||||
typedef SampleTraits<SampleFormat::S16> DT;
|
typedef SampleTraits<SampleFormat::S16> DT;
|
||||||
DitherShift<ST, DT>(dest, src, src_end);
|
DitherConvert<ST, DT>(dest, src, src_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -100,5 +100,5 @@ PcmDither::Dither32To16(int16_t *dest, const int32_t *src,
|
|||||||
{
|
{
|
||||||
typedef SampleTraits<SampleFormat::S32> ST;
|
typedef SampleTraits<SampleFormat::S32> ST;
|
||||||
typedef SampleTraits<SampleFormat::S16> DT;
|
typedef SampleTraits<SampleFormat::S16> DT;
|
||||||
DitherShift<ST, DT>(dest, src, src_end);
|
DitherConvert<ST, DT>(dest, src, src_end);
|
||||||
}
|
}
|
||||||
|
@ -43,12 +43,12 @@ private:
|
|||||||
T Dither(T sample);
|
T Dither(T sample);
|
||||||
|
|
||||||
template<typename ST, typename DT>
|
template<typename ST, typename DT>
|
||||||
typename DT::value_type DitherShift(typename ST::value_type sample);
|
typename DT::value_type DitherConvert(typename ST::value_type sample);
|
||||||
|
|
||||||
template<typename ST, typename DT>
|
template<typename ST, typename DT>
|
||||||
void DitherShift(typename DT::pointer_type dest,
|
void DitherConvert(typename DT::pointer_type dest,
|
||||||
typename ST::const_pointer_type src,
|
typename ST::const_pointer_type src,
|
||||||
typename ST::const_pointer_type src_end);
|
typename ST::const_pointer_type src_end);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user