Ok so I have a frequency generator which uses AudioTrack to send PCM data to the hardware. Here\'s the code I\'m using for that:
private class playSoundTask ext
In case anyone stumbles across this with the same problem (as I did), the solution actually has nothing to do with buffers, it has to do with the sine function. Try replacing angle += increment
with angle += (increment % (2.0f * (float) Math.PI));
. Also, for efficiency, try using FloatMath.sin() instead of Math.sin().