Anyone know where I would start learning code to mix audio channels from McASP.
I have the PDK demo version of McASP audio passthrough working.
Does anyone have example code of something like this working with McASP already I could take a look at?
// 5 channel mixer algorithm in 32 bit without clipping ?
#define c1 0x19999999 // c1 = 0.2
#define c2 0x0CCCCCCC // c2 = 0.1
#define c3 0x26666666 // c3 = 0.3
#define c4 0x06666666 // c4 = 0.05
#define c5 0x39999999 // c5 = 0.45
// somewhere inside McASP Receive Interrupt Service Routine????
// copy input samples from channels //
r1 = dm(channel_1); {audio channel 1 input sample}
r2 = dm(channel_2); {audio channel 2 input sample}
r3 = dm(channel_3); {audio channel 2 input sample}
r4 = dm(channel_4); {audio channel 2 input sample}
r5 = dm(channel_5); {audio channel 2 input sample}
r6 = c1;
mrf = r6 * r1 (ssf); {mrf = c1*x1}
r7 = c2;
mrf = mrf + r7 * r2 (ssf); {mrf = c1*x1 + c2*x2}
r8 = c3;
mrf = mrf + r4 * r2 (ssfr); {mrf = c1*x1 + c2*x2 + c3*x3}
r9 = c4;
mrf = mrf + r4 * r2 (ssfr); {mrf = c1*x1 + c2*x2 + c3*x3 + c4*x4}
r10 = c5;
mrf = mrf + r4 * r2 (ssfr); {mrf = y= c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5}
mrf = sat mrf; /// What is SAT ? what is this doing ?? also what is ssf and ssfr timing or frames ???
// copy mixed channels to both left and right channels ready to go to balance mix code…?
r0 = mrf; /// was written as mr1f ,, must have been a typo?? changed to mrf
dm(left_output) = r0; {left output sample}
dm(right_output) = r0; {right output sample}