How to play two sine wave on left and right channel separately with 16-bit format?
问题 I need to generate 2 sine wave tones with different frequency and play them separately into right and left channel in stereo mode on Android. This is my code: int sample; double sampleRate; double duration; double time; double f1; double f2; double amplitude1; double amplitude2; double sineWave1; double sineWave2; float[] buffer1; float[] buffer2; byte[] byteBuffer1; byte[] byteBuffer2; byte[] byteBufferFinal; int bufferIndex; short x; short y; AudioTrack audioTrack; @Override public void