I have an Android AudioTrack such as:
private AudioTrack mAudioTrack;
int min = AudioTrack.getMinBufferSize(sampleRate, AudioFormat.CHANNEL_OUT_STEREO, AudioFormat.ENCODING_PCM_16BIT);
mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, AudioFormat.CHANNEL_OUT_STEREO, AudioFormat.ENCODING_PCM_16BIT, min, AudioTrack.MODE_STREAM);
mAudioTrack.play();
and I fill it with:
mAudioTrack.write(buffer, 0, bufsize);
I would like to have this track to be played with a 2-second delay. Any idea how I could achieve that? Thanks in advance for any good idea.