diff options
author | Chris Robinson <[email protected]> | 2017-01-24 19:03:51 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-01-24 19:03:51 -0800 |
commit | 1ebfce4cac35731f1df5702ce613eada81f6ffa5 (patch) | |
tree | 088280e9029af29f73a0a4949256f99d84074bc5 /Alc/bformatdec.h | |
parent | f4d52f43d87c02769c7649b91ba4afc967e121d2 (diff) |
Improve the ambisonic upscaling methods
This now takes advantage of the differences seen in generated decoder matrices
for first-order compared to second- and third-order, such that with the
appropriate frequency-dependent scaling applied to first-order content, the
result is identical with a higher-order decoder matrix compared to a first-
order matrix for the same layout.
Diffstat (limited to 'Alc/bformatdec.h')
-rw-r--r-- | Alc/bformatdec.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Alc/bformatdec.h b/Alc/bformatdec.h index 3f240e54..7024b003 100644 --- a/Alc/bformatdec.h +++ b/Alc/bformatdec.h @@ -3,6 +3,24 @@ #include "alMain.h" + +/* These are the necessary scales for first-order HF responses to play over + * higher-order 2D (non-periphonic) decoders. + */ +#define W_SCALE2D_SECOND 1.224744871f /* sqrt(1.5) */ +#define XYZ_SCALE2D_SECOND 1.0f +#define W_SCALE2D_THIRD 1.414213562f /* sqrt(2) */ +#define XYZ_SCALE2D_THIRD 1.082392196f + +/* These are the necessary scales for first-order HF responses to play over + * higher-order 3D (periphonic) decoders. + */ +#define W_SCALE3D_SECOND 1.341640787f /* sqrt(1.8) */ +#define XYZ_SCALE3D_SECOND 1.0f +#define W_SCALE3D_THIRD 1.695486018f +#define XYZ_SCALE3D_THIRD 1.136697713f + + struct AmbDecConf; struct BFormatDec; struct AmbiUpsampler; |