Allow the remix tables to be variable length

This commit is contained in:
Chris Robinson 2022-08-28 06:11:40 -07:00
parent 057a350c1e
commit 84134d7399
2 changed files with 10 additions and 10 deletions

@ -1513,12 +1513,12 @@ ALCenum EnumFromDevAmbi(DevAmbiScaling scaling)
* PulseAudio's.
*/
const std::array<InputRemixMap,6> StereoDownmix{{
{ FrontCenter, {{{FrontLeft, 0.5f}, {FrontRight, 0.5f}}} },
{ SideLeft, {{{FrontLeft, 1.0f/9.0f}, {FrontRight, 0.0f}}} },
{ SideRight, {{{FrontLeft, 0.0f}, {FrontRight, 1.0f/9.0f}}} },
{ BackLeft, {{{FrontLeft, 1.0f/9.0f}, {FrontRight, 0.0f}}} },
{ BackRight, {{{FrontLeft, 0.0f}, {FrontRight, 1.0f/9.0f}}} },
{ BackCenter, {{{FrontLeft, 0.5f/9.0f}, {FrontRight, 0.5f/9.0f}}} },
{ FrontCenter, {{{FrontLeft, 0.5f}, {FrontRight, 0.5f}}} },
{ SideLeft, {{{FrontLeft, 1.0f/9.0f}}} },
{ SideRight, {{{FrontRight, 1.0f/9.0f}}} },
{ BackLeft, {{{FrontLeft, 1.0f/9.0f}}} },
{ BackRight, {{{FrontRight, 1.0f/9.0f}}} },
{ BackCenter, {{{FrontLeft, 0.5f/9.0f}, {FrontRight, 0.5f/9.0f}}} },
}};
const std::array<InputRemixMap,4> QuadDownmix{{
{ FrontCenter, {{{FrontLeft, 0.5f}, {FrontRight, 0.5f}}} },
@ -1527,9 +1527,9 @@ const std::array<InputRemixMap,4> QuadDownmix{{
{ BackCenter, {{{BackLeft, 0.5f}, {BackRight, 0.5f}}} },
}};
const std::array<InputRemixMap,3> X51Downmix{{
{ BackLeft, {{{SideLeft, 1.0f}, {SideRight, 0.0f}}} },
{ BackRight, {{{SideLeft, 0.0f}, {SideRight, 1.0f}}} },
{ BackCenter, {{{SideLeft, 0.5f}, {SideRight, 0.5f}}} },
{ BackLeft, {{{SideLeft, 1.0f}}} },
{ BackRight, {{{SideRight, 1.0f}}} },
{ BackCenter, {{{SideLeft, 0.5f}, {SideRight, 0.5f}}} },
}};
const std::array<InputRemixMap,2> X61Downmix{{
{ BackLeft, {{{BackCenter, 0.5f}, {SideLeft, 0.5f}}} },

@ -69,7 +69,7 @@ struct InputRemixMap {
struct TargetMix { Channel channel; float mix; };
Channel channel;
std::array<TargetMix,2> targets;
al::span<const TargetMix> targets;
};