#include <mix.h>
Upmix/downmix a stereo signal to an (even) multi-channel signal.
When spreading out, it rotates the input by various amounts (e.g. a four-channel signal would produce (left, right, mid side)), such that energy is preserved for each pair.
When mixing together, it uses the opposite rotations, such that upmix → downmix produces the same stereo signal (when scaled by .scalingFactor1().
Static Methods | |
| static constexpr Sample | scalingFactor1 () |
| Scaling factor for the downmix, if channels are phase-aligned. | |
| static Sample | scalingFactor2 () |
| Scaling factor for the downmix, if channels are independent. | |
Methods | |
| template<class In, class Out> | |
| void | stereoToMulti (In &input, Out &output) const |
| template<class In, class Out> | |
| void | multiToStereo (In &input, Out &output) const |
|
inlinestaticconstexpr |
Scaling factor for the downmix, if channels are phase-aligned.
|
inlinestatic |
Scaling factor for the downmix, if channels are independent.