This provider supports these PCM conversions, most in both directions.
- 8 Signed to and from 8 unsigned
- 16/24/32 Signed little endian to and from 16/24/32 Signed big endian
- arbitrary conversion between 8/16/24/32 bit sample width
(up-conversion is done by adding low-byte zero(s)).
- 1 channel to and from x channels
The class uses 2 different approaches for conversion:
- Simple, often used conversions with performance-optimized methods.
These are the following conversions:
- 8 Signed to and from 8 unsigned
- 16 signed little endian to and from 16 signed big endian
- 24 signed little endian to and from 24 signed big endian
- 32 signed little endian to and from 32 signed big endian
- 16 signed little endian to and from 8 signed
- 16 signed big endian to and from 8 signed
- 16 signed little endian to and from 8 unsigned
- 16 signed big endian to and from 8 unsigned
Downsampling from 16bit to 8bit is currently done using the float conversion
(see next point), in order to profit of dithering.
- All other conversions are done using the FloatSampleBuffer.
Mixdown of channels (x channels to 1 channel) is done by plainly adding all
channels together. Thus, up mixing and down mixing will not result in the
same audio, as downmixing does NOT lower the volume and clippings are very
probable. To avoid that, the volume of the channels should be lowered before
using this converter for down mixing.
- All conversions support upmixing of channels: 1 channel to x channels.
This is done by copying the channel to the other channels after
conversion of the format (if necessary).
SampleRate CANNOT be converted.