Results 1 to 2 of 2

Thread: Making audio synthesis with OpenSL

  1. #1
    Join Date
    Feb 2016

    Making audio synthesis with OpenSL

    Hello, I'm making audio app on Android with use of some synthesis, FM or AM. I started with Native Audio project. Little bit of sound generation is there, but I don't know how I can continue with it.

    Here is code for sawtooth sound

    Code :
    for (i = 0; i < SAWTOOTH_FRAMES; ++i) {
        sawtoothBuffer[i] = 32768 - ((i % 100) * 660);

    Can someone explain me why these numbers? I looked into OpenSL API, but nothing found about synthesizing sound.


  2. #2
    Join Date
    Feb 2016
    Yes, but about synthesis is nothing there.

    About my question.. I figured it out, it's actually pretty easy, but I got another problem.

    Generating of sawtooth wave is fine. I printed out the result and it's looking good. But the sound is weird.
    Here is what I recorded.
    It's same for sawtooth and square, but when I play with sawtooth A, then sound is normal
    Does someone know what is wrong? If I increase size of buffer, then period is longer, but still the same problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean