#include "zqr.h"
static void mix11(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
}
static void mix12(int*mixbuf,const int*samples) {
mixbuf[0]+=(samples[0]+samples[1])>>1;
}
static void mix13(int*mixbuf,const int*samples) {
mixbuf[0]+=(samples[0]+samples[1]+samples[2])>>1;
}
static void mix14(int*mixbuf,const int*samples) {
mixbuf[0]+=(samples[0]+samples[1]+samples[2]+samples[3])>>1;
}
static void mix15(int*mixbuf,const int*samples) {
mixbuf[0]+=(samples[0]+samples[1]+samples[2]+samples[3]+samples[4])>>1;
}
static void mix16(int*mixbuf,const int*samples) {
mixbuf[0]+=(samples[0]+samples[1]+samples[2]+samples[3]+samples[4]+samples[5])>>1;
}
static void mix17(int*mixbuf,const int*samples) {
mixbuf[0]+=(samples[0]+samples[1]+samples[2]+samples[3]+samples[4]+samples[5]+samples[6])>>1;
}
static void mix18(int*mixbuf,const int*samples) {
mixbuf[0]+=(samples[0]+samples[1]+samples[2]+samples[3]+samples[4]+samples[5]+samples[6]+samples[7])>>1;
}
static void mix21(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0]; // TODO: Panorama!!
mixbuf[1]+=samples[0];
}
static void mix22(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
}
static void mix23(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0]+(samples[2]>>1); // Center je zur Hälfte auf links und rechts geben
mixbuf[1]+=samples[1]+(samples[2]>>1);
}
static void mix24(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0]+samples[2];
mixbuf[1]+=samples[1]+samples[3];
}
static void mix25(int*mixbuf,const int*samples) {
int m=samples[2]>>1; // Center ist (bei Microsoft) Index 2
mixbuf[0]+=samples[0]+samples[3]+m;
mixbuf[1]+=samples[1]+samples[4]+m;
}
static void mix26(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3])>>1; // Subwoofer ist (bei Microsoft) Index 3
mixbuf[0]+=samples[0]+samples[4]+m; // Center und Subwoofer gleichmäßig verteilen
mixbuf[1]+=samples[1]+samples[5]+m;
}
static void mix27(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3]+samples[6])>>1;
mixbuf[0]+=samples[0]+samples[4]+m;
mixbuf[1]+=samples[1]+samples[5]+m;
}
static void mix28(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3]+samples[6]+samples[7])>>1;
mixbuf[0]+=samples[0]+samples[4]+m;
mixbuf[1]+=samples[1]+samples[5]+m;
}
// TODO: Ab hier ist die Funktionalität teilweise falsch!!
static void mix31(int*mixbuf,const int*samples) {
mixbuf[2]+=samples[0]; // TODO: Panorama!!
}
static void mix32(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
}
static void mix33(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
}
static void mix34(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0]+samples[2];
mixbuf[1]+=samples[1]+samples[3];
}
static void mix35(int*mixbuf,const int*samples) {
int m=samples[2]>>1;
mixbuf[0]+=samples[0]+samples[3]+m;
mixbuf[1]+=samples[1]+samples[4]+m;
}
static void mix36(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3])>>1; // Subwoofer ist (bei Microsoft) Index 3
mixbuf[0]+=samples[0]+samples[4]+m; // Center und Subwoofer gleichmäßig verteilen
mixbuf[1]+=samples[1]+samples[5]+m;
}
static void mix37(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3]+samples[6])>>1;
mixbuf[0]+=samples[0]+samples[4]+m;
mixbuf[1]+=samples[1]+samples[5]+m;
}
static void mix38(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3]+samples[6]+samples[7])>>1;
mixbuf[0]+=samples[0]+samples[4]+m;
mixbuf[1]+=samples[1]+samples[5]+m;
}
static void mix43(int*mixbuf,const int*samples) {
int m=samples[2]>>1;
mixbuf[0]+=samples[0]+m;
mixbuf[1]+=samples[1]+m;
}
static void mix44(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
mixbuf[3]+=samples[3];
}
static void mix45(int*mixbuf,const int*samples) {
int m=samples[2]>>1;
mixbuf[0]+=samples[0]+m;
mixbuf[1]+=samples[1]+m;
mixbuf[2]+=samples[3];
mixbuf[3]+=samples[4];
}
static void mix46(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3])>>1;
mixbuf[0]+=samples[0]+m;
mixbuf[1]+=samples[1]+m;
mixbuf[2]+=samples[4];
mixbuf[3]+=samples[5];
}
static void mix47(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3]+samples[6])>>1;
mixbuf[0]+=samples[0]+m;
mixbuf[1]+=samples[1]+m;
mixbuf[2]+=samples[4];
mixbuf[3]+=samples[5];
}
static void mix48(int*mixbuf,const int*samples) {
int m=(samples[2]+samples[3]+samples[6]+samples[7])>>1;
mixbuf[0]+=samples[0]+m;
mixbuf[1]+=samples[1]+m;
mixbuf[2]+=samples[4];
mixbuf[3]+=samples[5];
}
static void mix54(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[3]+=samples[2];
mixbuf[4]+=samples[3];
}
static void mix55(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
mixbuf[3]+=samples[3];
mixbuf[4]+=samples[4];
}
static void mix56(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2]+samples[3];
mixbuf[3]+=samples[4];
mixbuf[4]+=samples[5];
}
static void mix57(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2]+samples[3]+samples[6];
mixbuf[3]+=samples[4];
mixbuf[4]+=samples[5];
}
static void mix58(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2]+samples[3]+samples[6]+samples[7];
mixbuf[3]+=samples[4];
mixbuf[4]+=samples[5];
}
static void mix64(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[4]+=samples[2];
mixbuf[5]+=samples[3];
}
static void mix65(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
mixbuf[4]+=samples[3];
mixbuf[5]+=samples[4];
}
static void mix66(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
mixbuf[3]+=samples[3];
mixbuf[4]+=samples[4];
mixbuf[5]+=samples[5];
}
static void mix67(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2]+samples[6];
mixbuf[3]+=samples[3];
mixbuf[4]+=samples[4];
mixbuf[5]+=samples[5];
}
static void mix68(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2]+samples[6]+samples[7];
mixbuf[3]+=samples[3];
mixbuf[4]+=samples[4];
mixbuf[5]+=samples[5];
}
static void mix77(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
mixbuf[3]+=samples[3];
mixbuf[4]+=samples[4];
mixbuf[5]+=samples[5];
mixbuf[6]+=samples[6];
}
static void mix78(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
mixbuf[3]+=samples[3];
mixbuf[4]+=samples[4];
mixbuf[5]+=samples[5];
mixbuf[6]+=samples[6]+samples[7];
}
static void mix88(int*mixbuf,const int*samples) {
mixbuf[0]+=samples[0];
mixbuf[1]+=samples[1];
mixbuf[2]+=samples[2];
mixbuf[3]+=samples[3];
mixbuf[4]+=samples[4];
mixbuf[5]+=samples[5];
mixbuf[6]+=samples[6];
mixbuf[7]+=samples[7];
}
const mixfunc_t mixfunc[8][8]={
{mix11,mix12,mix13,mix14,mix15,mix16,mix17,mix18},
{mix21,mix22,mix23,mix24,mix25,mix26,mix27,mix28},
{mix31,mix32,mix33,mix34,mix35,mix36,mix37,mix38},
{mix21,mix22,mix43,mix44,mix45,mix46,mix47,mix48},
{mix31,mix32,mix33,mix54,mix55,mix56,mix57,mix58},
{mix31,mix32,mix33,mix64,mix65,mix66,mix67,mix68},
{mix31,mix32,mix33,mix64,mix65,mix66,mix77,mix78},
{mix31,mix32,mix33,mix64,mix65,mix66,mix77,mix88}
};
Vorgefundene Kodierung: UTF-8 | 0
|