Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the voice data processing part #3

Open
anla-xu opened this issue Mar 18, 2022 · 0 comments
Open

Questions about the voice data processing part #3

anla-xu opened this issue Mar 18, 2022 · 0 comments

Comments

@anla-xu
Copy link

anla-xu commented Mar 18, 2022

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;
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant