private long getPlaybackheadPositionUs() {
        // The playback head position is encoded as a uint in an int
        long playbackHeadPosition = 0xFFFFFFFFL & mAudioTrack.getPlaybackHeadPosition();
        // Convert frames to time
        return (long)((double)playbackHeadPosition / mSampleRate * 1000000);
    }
Returns the length of the playback buffer, without posidering the current playback position
inside the buffer (the remaining audio data that is waiting for playback can be less than
the buffer length).
@return the length of the playback buffer in microsecs
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/AudioPlayback.java