Determine the end of tone played with AudioTrack
<p>I am playing a short tone using code that I got from:</p>

<p>Playing an arbitrary tone with Android</p>

<p>It works fine.  However, I want to generate a second (and third and fourth) tone when
the first (and second and third) tone is finished.  I suspect it can be done using
MediaPlayer, but the setDataSource() call wants a file/URL and I have an array built
by hand.  AudiioTrack suggests it can be done with setPlaybackPositionUpdateListener()
but the consensus seems to be that it doesn't work.  I haven't been able to make it work.
getPlayState() always returns '3' after audoTack.play() is called.</p>

<p>The goal is to make the playing of each tone a blocking operation.  How can I tell when
a tone is finished.</p>

<p>Thanks for any help.</p>
