Max Kellermann
7eda72d440
pcm/Volume: use number of samples instead of end pointer
2014-01-07 00:42:02 +01:00
Max Kellermann
c75339edcc
pcm/Format: change parameters/return values to ConstBuffer
2014-01-06 23:08:49 +01:00
Max Kellermann
b0b7244b3a
pcm/Format: use number of samples instead of end pointer
2014-01-06 22:42:33 +01:00
Max Kellermann
92aa464edb
pcm/Volume: remove unused function pcm_volume_dither()
2013-12-28 18:39:26 +01:00
Max Kellermann
da29298d4d
pcm/PcmMix: improved dithering
...
Use the existing PcmDither library.
2013-12-28 18:30:27 +01:00
Max Kellermann
afcf0795c4
pcm/Volume: improved dithering
...
Instead of just adding a rectangular random value before shifting back
to the normal scale, use the existing PcmDither library.
2013-12-28 18:30:24 +01:00
Max Kellermann
394e2815db
pcm/PcmDither: inline Dither24To16() and Dither32To16()
2013-12-28 18:30:13 +01:00
Max Kellermann
f3bbe4bb1f
pcm/Volume: remove optimized i386 assembly
...
This code is unable to dither. Until we implement that, let's remove
the code for now. i386 isn't relevant anymore anyway.
2013-12-28 17:24:54 +01:00
Max Kellermann
2a3a18a283
pcm/Traits: use 32 bit integer for S8 long_type
...
16 bit is not enough for volume calculations.
2013-12-25 12:28:18 +01:00
Max Kellermann
431c80f4f0
pcm/Dither: add API documentation
2013-12-24 23:45:38 +01:00
Max Kellermann
9ac18c39a1
pcm/Dither: move shift from DitherConvert() to Dither()
...
All callers need this shift, so let's move it to the basic method.
2013-12-24 23:39:29 +01:00
Max Kellermann
d1b7473418
pcm/Dither: rename DitherShift() to DitherConvert()
2013-12-24 23:38:11 +01:00
Max Kellermann
8edde7a4b3
pcm/Volume: convert to class
...
Prepare for adding state.
2013-12-23 10:58:37 +01:00
Max Kellermann
d11a0c9f14
pcm/Volume: apply volume into destination buffer
2013-12-23 10:55:29 +01:00
Max Kellermann
7be2abe6b5
pcm/Volume: convert i386 code to template specialization
2013-12-23 10:35:35 +01:00
Max Kellermann
4a62cd4ad8
pcm/Volume: move code to template pcm_volume_sample()
2013-12-23 10:35:23 +01:00
Max Kellermann
6d21b9448a
pcm/PcmVolume: rename to Volume.cxx
2013-12-23 10:35:21 +01:00
Max Kellermann
2d1a3073f6
pcm/PcmConvert: move the Domain instance to Domain.cxx
...
Rename pcm_convert_domain to pcm_domain. Move it out so we can use it
without depending on the whole PcmConvert library.
2013-12-23 10:35:19 +01:00
Max Kellermann
1543e529f1
pcm/Dither: convert remaining methods to templates
...
Use the SampleTraits template and let the compiler generate a special
case for S32 instead of reusing S24_P32.
2013-12-22 22:18:06 +01:00
Max Kellermann
4043f320fe
pcm/Dither: generic sample dithering using template
2013-12-22 22:06:25 +01:00
Max Kellermann
32b834aa04
pcm/Traits: include stddef.h for size_t
2013-12-22 22:06:25 +01:00
Max Kellermann
b43ec3d6f0
pcm/Traits: add MIN and MAX
...
Move from PcmClamp().
2013-12-22 21:32:25 +01:00
Max Kellermann
316a25dead
pcm/Volume: add constant PCM_VOLUME_BITS
2013-12-22 21:31:17 +01:00
Max Kellermann
bfe020e06c
pcm/Volume: make PCM_VOLUME_1 a "constexpr"
2013-12-22 21:20:40 +01:00
Max Kellermann
5aae560683
pcm/Prng: make pcm_prng() inline
2013-12-22 21:20:38 +01:00
Max Kellermann
86e72ffefb
util/Clamp: generic Clamp() function
2013-12-22 21:08:06 +01:00
Max Kellermann
c6ef0e8887
pcm/Traits: add typedef "sum_type"
...
Allow 32 bit platforms to use 32 bit instead of 64 bit for summing 24
bit samples.
2013-12-02 11:48:10 +01:00
Max Kellermann
f761d583b5
pcm/Traits: use int_leastX_t types
2013-12-02 11:47:17 +01:00
Max Kellermann
cee1ac150e
pcm/PcmChannels: implement fake N-to-M mapping
...
This is really just a mono mapper, but the important part is that this
library cannot fail anymore.
2013-12-02 11:42:19 +01:00
Max Kellermann
71b47ae3ef
pcm/PcmChannels: use the SampleTraits library
2013-12-02 11:28:54 +01:00
Max Kellermann
36e3fda554
pcm/Traits: add template specialization for FLOAT
2013-12-02 11:26:38 +01:00
Max Kellermann
2b44a2c9bd
pcm/PcmChannels: use struct ConstBuffer
2013-12-02 11:21:32 +01:00
Max Kellermann
af3b454805
pcm/PcmBuffer: add typed method GetT()
2013-12-02 11:21:32 +01:00
Max Kellermann
3a0f3eaa50
pcm/PcmUtils: use the SampleTraits library
2013-12-02 11:21:32 +01:00
Max Kellermann
80eb8d9e26
pcm/PcmUtils: remove unused function PcmClampN()
2013-12-02 11:21:32 +01:00
Max Kellermann
30c4136c4d
pcm/PcmVolume: use the SampleTraits library
2013-12-02 11:21:32 +01:00
Max Kellermann
83e4475021
pcm/PcmFormat: use SampleTraits::long_type in ConvertFromFloat()
2013-12-02 11:21:32 +01:00
Max Kellermann
c071d6d9f6
pcm/PcmPrng: add "constexpr"
2013-12-02 11:21:32 +01:00
Max Kellermann
023482406f
pcm/PcmMix: use the SampleTraits library for MixRamp
2013-12-01 22:49:50 +01:00
Max Kellermann
04ba40981f
pcm/PcmMix: use the SampleTraits library
2013-12-01 22:44:16 +01:00
Max Kellermann
fc10bdf24d
pcm/SampleTraits: use 64 bit for S24 long_type
2013-12-01 22:44:16 +01:00
Max Kellermann
28ad79c97a
pcm/Traits: add typedef long_type
2013-12-01 19:32:48 +01:00
Max Kellermann
7661ad6653
pcm/Traits: add API documentation
2013-12-01 19:32:00 +01:00
Max Kellermann
e1436063ff
pcm/PcmFormat: move generic definitions to Traits.hxx
2013-12-01 19:24:37 +01:00
Max Kellermann
3e11a28cd9
pcm/SoxrResampler: new resampler option using libsoxr
2013-12-01 19:13:39 +01:00
Max Kellermann
3ed80f3139
pcm/ConfiguredResampler: convert boolean flag to enum
...
Prepare for adding more resamplers.
2013-12-01 19:13:39 +01:00
Max Kellermann
5ba90cd8ea
pcm/PcmResampler: convert to abstract interface
...
The PcmResampler interface is implemented by the two classes
FallbackPcmResampler and LibsampleratePcmResampler. This prepares for
adding more resampler libraries.
2013-11-30 16:22:57 +01:00
Max Kellermann
e9127523db
pcm/PcmConvert: move code to new class GluePcmResampler
2013-11-30 14:10:31 +01:00
Max Kellermann
92004f2e7e
pcm/PcmConvert: move code to new class PcmChannelsConverter
2013-11-30 13:22:25 +01:00
Max Kellermann
0eefc7a43c
pcm/PcmConvert: move code to new class PcmFormatConverter
2013-11-30 13:08:55 +01:00