Code example for AudioTrack

Methods: flushstop

0
            } catch (IOException e) {
                e.printStackTrace();
            } 
 
        if (mTrack != null) {
            mTrack.stop();
            mTrack.flush();
        } 
 
        synchronized (playingLock) {
        } 
    } 
 
    public long getDurationMillisec() { 
        return (long) ((double) mTotalSamples * 1000 / SAMPLE_FREQUENCY);
    } 
 
    public boolean isPlaying() { 
        if (mTrack == null)
            return false;