Code example for AudioTrack

Methods: getPlaybackHeadPosition

0
    } 
 
    public long getProgressMillisec() { 
        if (mTrack != null)
            try { 
                return (long) ((double) mTrack.getPlaybackHeadPosition() * 1000 / SAMPLE_FREQUENCY);
            } catch (Exception e) {
            } 
 
        return 0; 
    } 
 
    public String getLastPlayedSampleName() {
        if (lastPlayedSample != null)
            return lastPlayedSample.assetFileName;
 
        return ""; 
    } 
 
    private class DecodingTask extends Thread {
        private Sample mSample;