diff options
Diffstat (limited to 'src/pcm')
-rw-r--r-- | src/pcm/Dither.cxx | 6 | ||||
-rw-r--r-- | src/pcm/Dither.hxx | 6 | ||||
-rw-r--r-- | src/pcm/Mix.cxx | 16 | ||||
-rw-r--r-- | src/pcm/PcmChannels.cxx | 32 | ||||
-rw-r--r-- | src/pcm/PcmFormat.cxx | 8 | ||||
-rw-r--r-- | src/pcm/Traits.hxx | 24 | ||||
-rw-r--r-- | src/pcm/Volume.cxx | 4 |
7 files changed, 48 insertions, 48 deletions
diff --git a/src/pcm/Dither.cxx b/src/pcm/Dither.cxx index 2e835423d..c45774065 100644 --- a/src/pcm/Dither.cxx +++ b/src/pcm/Dither.cxx @@ -89,9 +89,9 @@ PcmDither::DitherConvert(typename ST::value_type sample) noexcept template<typename ST, typename DT> inline void -PcmDither::DitherConvert(typename DT::pointer_type dest, - typename ST::const_pointer_type src, - typename ST::const_pointer_type src_end) noexcept +PcmDither::DitherConvert(typename DT::pointer dest, + typename ST::const_pointer src, + typename ST::const_pointer src_end) noexcept { while (src < src_end) *dest++ = DitherConvert<ST, DT>(*src++); diff --git a/src/pcm/Dither.hxx b/src/pcm/Dither.hxx index 7acfa24a0..788c28fe8 100644 --- a/src/pcm/Dither.hxx +++ b/src/pcm/Dither.hxx @@ -76,9 +76,9 @@ private: typename DT::value_type DitherConvert(typename ST::value_type sample) noexcept; template<typename ST, typename DT> - void DitherConvert(typename DT::pointer_type dest, - typename ST::const_pointer_type src, - typename ST::const_pointer_type src_end) noexcept; + void DitherConvert(typename DT::pointer dest, + typename ST::const_pointer src, + typename ST::const_pointer src_end) noexcept; }; #endif diff --git a/src/pcm/Mix.cxx b/src/pcm/Mix.cxx index 1ca506b88..fd6280145 100644 --- a/src/pcm/Mix.cxx +++ b/src/pcm/Mix.cxx @@ -46,8 +46,8 @@ PcmAddVolume(PcmDither &dither, template<SampleFormat F, class Traits=SampleTraits<F>> static void PcmAddVolume(PcmDither &dither, - typename Traits::pointer_type a, - typename Traits::const_pointer_type b, + typename Traits::pointer a, + typename Traits::const_pointer b, size_t n, int volume1, int volume2) noexcept { for (size_t i = 0; i != n; ++i) @@ -65,8 +65,8 @@ PcmAddVolumeVoid(PcmDither &dither, assert(size % sample_size == 0); PcmAddVolume<F, Traits>(dither, - typename Traits::pointer_type(a), - typename Traits::const_pointer_type(b), + typename Traits::pointer(a), + typename Traits::const_pointer(b), size / sample_size, volume1, volume2); } @@ -143,8 +143,8 @@ PcmAdd(typename Traits::value_type _a, typename Traits::value_type _b) noexcept template<SampleFormat F, class Traits=SampleTraits<F>> static void -PcmAdd(typename Traits::pointer_type a, - typename Traits::const_pointer_type b, +PcmAdd(typename Traits::pointer a, + typename Traits::const_pointer b, size_t n) noexcept { for (size_t i = 0; i != n; ++i) @@ -158,8 +158,8 @@ PcmAddVoid(void *a, const void *b, size_t size) noexcept constexpr size_t sample_size = Traits::SAMPLE_SIZE; assert(size % sample_size == 0); - PcmAdd<F, Traits>(typename Traits::pointer_type(a), - typename Traits::const_pointer_type(b), + PcmAdd<F, Traits>(typename Traits::pointer(a), + typename Traits::const_pointer(b), size / sample_size); } diff --git a/src/pcm/PcmChannels.cxx b/src/pcm/PcmChannels.cxx index c620eabee..242bd54ba 100644 --- a/src/pcm/PcmChannels.cxx +++ b/src/pcm/PcmChannels.cxx @@ -55,10 +55,10 @@ StereoToMono(typename Traits::value_type _a, } template<SampleFormat F, class Traits=SampleTraits<F>> -static typename Traits::pointer_type -StereoToMono(typename Traits::pointer_type dest, - typename Traits::const_pointer_type src, - typename Traits::const_pointer_type end) noexcept +static typename Traits::pointer +StereoToMono(typename Traits::pointer dest, + typename Traits::const_pointer src, + typename Traits::const_pointer end) noexcept { while (src != end) { const auto a = *src++; @@ -71,11 +71,11 @@ StereoToMono(typename Traits::pointer_type dest, } template<SampleFormat F, class Traits=SampleTraits<F>> -static typename Traits::pointer_type -NToStereo(typename Traits::pointer_type dest, +static typename Traits::pointer +NToStereo(typename Traits::pointer dest, unsigned src_channels, - typename Traits::const_pointer_type src, - typename Traits::const_pointer_type end) noexcept + typename Traits::const_pointer src, + typename Traits::const_pointer end) noexcept { assert((end - src) % src_channels == 0); @@ -100,11 +100,11 @@ NToStereo(typename Traits::pointer_type dest, * remaining (surround) channels are filled with silence. */ template<SampleFormat F, class Traits=SampleTraits<F>> -static typename Traits::pointer_type -StereoToN(typename Traits::pointer_type dest, +static typename Traits::pointer +StereoToN(typename Traits::pointer dest, unsigned dest_channels, - typename Traits::const_pointer_type src, - typename Traits::const_pointer_type end) noexcept + typename Traits::const_pointer src, + typename Traits::const_pointer end) noexcept { assert(dest_channels > 2); assert((end - src) % 2 == 0); @@ -127,12 +127,12 @@ StereoToN(typename Traits::pointer_type dest, } template<SampleFormat F, class Traits=SampleTraits<F>> -static typename Traits::pointer_type -NToM(typename Traits::pointer_type dest, +static typename Traits::pointer +NToM(typename Traits::pointer dest, unsigned dest_channels, unsigned src_channels, - typename Traits::const_pointer_type src, - typename Traits::const_pointer_type end) noexcept + typename Traits::const_pointer src, + typename Traits::const_pointer end) noexcept { assert((end - src) % src_channels == 0); diff --git a/src/pcm/PcmFormat.cxx b/src/pcm/PcmFormat.cxx index b819e0a82..b4078283a 100644 --- a/src/pcm/PcmFormat.cxx +++ b/src/pcm/PcmFormat.cxx @@ -36,8 +36,8 @@ struct PerSampleConvert : C { typedef typename C::SrcTraits SrcTraits; typedef typename C::DstTraits DstTraits; - void Convert(typename DstTraits::pointer_type gcc_restrict out, - typename SrcTraits::const_pointer_type gcc_restrict in, + void Convert(typename DstTraits::pointer gcc_restrict out, + typename SrcTraits::const_pointer gcc_restrict in, size_t n) const { transform_n(in, n, out, C::Convert); } @@ -91,8 +91,8 @@ public: typedef typename Portable::SrcTraits SrcTraits; typedef typename Portable::DstTraits DstTraits; - void Convert(typename DstTraits::pointer_type out, - typename SrcTraits::const_pointer_type in, + void Convert(typename DstTraits::pointer out, + typename SrcTraits::const_pointer in, size_t n) const { Optimized::Convert(out, in, n); diff --git a/src/pcm/Traits.hxx b/src/pcm/Traits.hxx index 9099924bc..289f69d32 100644 --- a/src/pcm/Traits.hxx +++ b/src/pcm/Traits.hxx @@ -43,12 +43,12 @@ struct SampleTraits<SampleFormat::S8> { /** * A writable pointer. */ - typedef value_type *pointer_type; + typedef value_type *pointer; /** * A read-only pointer. */ - typedef const value_type *const_pointer_type; + typedef const value_type *const_pointer; /** * A "long" type that is large and accurate enough for adding @@ -94,8 +94,8 @@ struct SampleTraits<SampleFormat::S8> { template<> struct SampleTraits<SampleFormat::S16> { typedef int16_t value_type; - typedef value_type *pointer_type; - typedef const value_type *const_pointer_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; typedef int_least32_t sum_type; typedef int_least32_t long_type; @@ -111,8 +111,8 @@ struct SampleTraits<SampleFormat::S16> { template<> struct SampleTraits<SampleFormat::S32> { typedef int32_t value_type; - typedef value_type *pointer_type; - typedef const value_type *const_pointer_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; typedef int_least64_t sum_type; typedef int_least64_t long_type; @@ -128,8 +128,8 @@ struct SampleTraits<SampleFormat::S32> { template<> struct SampleTraits<SampleFormat::S24_P32> { typedef int32_t value_type; - typedef value_type *pointer_type; - typedef const value_type *const_pointer_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; typedef int_least32_t sum_type; typedef int_least64_t long_type; @@ -145,8 +145,8 @@ struct SampleTraits<SampleFormat::S24_P32> { template<> struct SampleTraits<SampleFormat::FLOAT> { typedef float value_type; - typedef value_type *pointer_type; - typedef const value_type *const_pointer_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; typedef float sum_type; typedef float long_type; @@ -161,8 +161,8 @@ struct SampleTraits<SampleFormat::FLOAT> { template<> struct SampleTraits<SampleFormat::DSD> { typedef uint8_t value_type; - typedef value_type *pointer_type; - typedef const value_type *const_pointer_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; static constexpr size_t SAMPLE_SIZE = sizeof(value_type); diff --git a/src/pcm/Volume.cxx b/src/pcm/Volume.cxx index 4efb8eeca..48c1f41d8 100644 --- a/src/pcm/Volume.cxx +++ b/src/pcm/Volume.cxx @@ -90,8 +90,8 @@ pcm_volume_sample(PcmDither &dither, template<SampleFormat F, class Traits=SampleTraits<F>> static void pcm_volume_change(PcmDither &dither, - typename Traits::pointer_type dest, - typename Traits::const_pointer_type src, + typename Traits::pointer dest, + typename Traits::const_pointer src, size_t n, int volume) noexcept { |