I'm making audio app on Android with use of some synthesis, FM or AM. I'm using OpenSL for lower latency. I used Audiotrack library and latency was horible, but making a sound is way easier than with OpenSL. 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
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.
Thanks