Open anla-xu opened 2 years ago
Hi. Thank you for enlightening me a lot with your project. As for the code of sound data processing, I don't quite understand it. Could you help me answer it? Thank you very much.
int byteOffset = 0; for (int i = 0; i < SAMPLES; i++) { sample_l_int = (int16_t)(((*(data + byteOffset + 1) << 8) | *(data + byteOffset))); sample_r_int = (int16_t)(((*(data + byteOffset + 3) << 8) | *(data + byteOffset + 2))); vReal[i] = (sample_l_int + sample_r_int) / 2.0f; vImag[i] = 0; byteOffset = byteOffset + 4; }
Hi. Thank you for enlightening me a lot with your project. As for the code of sound data processing, I don't quite understand it. Could you help me answer it? Thank you very much.