I have 3 files, two are mono, one are stereo. I want to play them together. Currently my code is like this but seems the output is not correct.
bool silence = !player1->process(stereoBuffer, false, numberOfSamples, vol);
silence = !(playerLeft->process(stereoBuffer, !silence, numberOfSamples,vol));
silence = !(playerRight->process(stereoBuffer, !silence, numberOfSamples,vol));
if (!silence) {
SuperpoweredFloatToShortInt(stereoBuffer, output, numberOfSamples);
return true;
}
Anyone know what is wrong here? I think i should use this method
void SuperpoweredFloatToShortIntInterleave(float *inputLeft, float *inputRight, short int *output, unsigned int numberOfSamples);
With 2 buffers for left and right, but then how can I add the data of the player1
into those 2 buffers? Please help.