I'm trying to play a PCM file in Android using the AudioTrack class. I can get the file to play just find but I cannot reliably tell when playback has finished. AudioTrack.getPlayState says playback has stopped when it hasn't. I'm having the same problem with AudioTrack.setNotificationMarkerPosition, and I'm pretty sure my marker is set to the end of the file (although I'm not completely sure I'm doing it right). Likewise, playback continues when getPlaybackHeadPosition is at the end of the file and has stopped incrementing. Can anyone help?