Code example for AudioTrack

Methods: releasestop

1
        }).start();
    } 
 
    private void stopPlayer(boolean reinit) {
        if(audiotrack != null) {
            try { audiotrack.stop(); } catch(Exception e) { e.printStackTrace(); }
            audiotrack.release();
            audiotrack = null;
            audio = null;
        } 
        if(reinit) {
            initializeAudioTrack(); 
        } 
    } 
 
    private void pausePlayer() { 
        if(audiotrack != null) {
            audiotrack.pause();
        } 
    } 
Connect your IDE to all the code out there  Get Codota for Java