24 #define LOC QString("Downmixer: ")
48 static const float m6db = 0.5;
49 static const float m3db = 0.7071067811865476F;
50 static const float mm3db = -0.7071067811865476F;
52 static const float sqrt_2_3 = 0.816496580927726F;
131 static const std::array<six_speaker_set,3>
s51_matrix
136 { 1, 0, 0, 0, 0, 0 },
137 { 0, 1, 0, 0, 0, 0 },
138 { 0, 0, 1, 0, 0, 0 },
139 { 0, 0, 0, 1, 0, 0 },
140 { 0, 0, 0, 0, 1, 0 },
141 { 0, 0, 0, 0, 0, 1 },
147 { 1, 0, 0, 0, 0, 0 },
148 { 0, 1, 0, 0, 0, 0 },
149 { 0, 0, 1, 0, 0, 0 },
150 { 0, 0, 0, 1, 0, 0 },
152 { 0, 0, 0, 0, 1, 0 },
153 { 0, 0, 0, 0, 0, 1 },
158 { 1, 0, 0, 0, 0, 0 },
159 { 0, 1, 0, 0, 0, 0 },
160 { 0, 0, 1, 0, 0, 0 },
161 { 0, 0, 0, 1, 0, 0 },
162 { 0, 0, 0, 0,
m3db, 0 },
163 { 0, 0, 0, 0, 0,
m3db },
164 { 0, 0, 0, 0,
m3db, 0 },
165 { 0, 0, 0, 0, 0,
m3db },
170 float *dst,
const float *src,
int frames)
172 if (channels_in < channels_out)
177 if (channels_out == 2)
179 int index = channels_in - 1;
180 for (
int n=0; n < frames; n++)
182 for (
int i=0; i < channels_out; i++)
185 for (
int j=0; j < channels_in; j++)
192 else if (channels_out == 6)
194 int index = channels_in - 6;
195 for (
int n=0; n < frames; n++)
197 for (
int i=0; i < channels_out; i++)
200 for (
int j=0; j < channels_in; j++)