way to recognize AudioTrack stopped
<p>Hallo,
I'm using AudioTrack</p>

<pre><code>audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,
     sampleRate, AudioFormat.CHANNEL_CONFIGURATION_MONO,
     AudioFormat.ENCODING_PCM_16BIT, numSamples,
     AudioTrack.MODE_STATIC);
audioTrack.write(generatedSnd, 0, numSamples) ;
audioTrack.play();
</code></pre>

<p>is there a way to recognize if audioTrack have stopped?</p>

<pre><code>while(audioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING){
    i++;
    System.out.println(i);
}
</code></pre>

<p>doesn't work... .</p>

<p>greetings </p>
