26#define LOC QString("Downmixer: ")
50static const float m6db = 0.5;
51static const float m3db = 0.7071067811865476F;
52static const float mm3db = -0.7071067811865476F;
54static const float sqrt_2_3 = 0.816496580927726F;
138 { 1, 0, 0, 0, 0, 0 },
139 { 0, 1, 0, 0, 0, 0 },
140 { 0, 0, 1, 0, 0, 0 },
141 { 0, 0, 0, 1, 0, 0 },
142 { 0, 0, 0, 0, 1, 0 },
143 { 0, 0, 0, 0, 0, 1 },
149 { 1, 0, 0, 0, 0, 0 },
150 { 0, 1, 0, 0, 0, 0 },
151 { 0, 0, 1, 0, 0, 0 },
152 { 0, 0, 0, 1, 0, 0 },
154 { 0, 0, 0, 0, 1, 0 },
155 { 0, 0, 0, 0, 0, 1 },
160 { 1, 0, 0, 0, 0, 0 },
161 { 0, 1, 0, 0, 0, 0 },
162 { 0, 0, 1, 0, 0, 0 },
163 { 0, 0, 0, 1, 0, 0 },
164 { 0, 0, 0, 0,
m3db, 0 },
165 { 0, 0, 0, 0, 0,
m3db },
166 { 0, 0, 0, 0,
m3db, 0 },
167 { 0, 0, 0, 0, 0,
m3db },
172 float *dst,
const float *src,
int frames)
174 if (channels_in < channels_out)
179 if (channels_out == 2)
181 int index = channels_in - 1;
182 for (
int n=0; n < frames; n++)
184 for (
int i=0; i < channels_out; i++)
187 for (
int j=0; j < channels_in; j++)
194 else if (channels_out == 6)
196 int index = channels_in - 6;
197 for (
int n=0; n < frames; n++)
199 for (
int i=0; i < channels_out; i++)
202 for (
int j=0; j < channels_in; j++)
static const std::array< six_speaker_set, 3 > s51_matrix
static const float msqrt_1_3bym3db
std::array< float, 2 > two_speaker_ratio
static const float sqrt_2_3by3db
static const float sqrt_2_3
std::array< float, 6 > six_speaker_ratio
static const std::array< two_speaker_set, 8 > stereo_matrix
std::array< six_speaker_ratio, 8 > six_speaker_set
std::array< two_speaker_ratio, 8 > two_speaker_set
static const float msqrt_1_3
static int DownmixFrames(int channels_in, int channels_out, float *dst, const float *src, int frames)