Code example for AudioTrack

Methods: flushgetPlayStategetStatestop

0
                    + ".startPlay(): Failed to initialise speakers."); 
        } 
    } 
 
    protected void stopPlay() { 
        if ((_speaker != null) && (_speaker.getState() == AudioTrack.STATE_INITIALIZED)) {
            if (_speaker.getPlayState() != AudioTrack.PLAYSTATE_STOPPED) {
                _speaker.flush();
                _speaker.stop();
            } 
            AndroidLog.getLog().debug( 
                    this.getClass().getSimpleName()
                    + ".stopPlay(): speaker stopped"); 
            _speakerFrames = 0;
            _hasSpeakerStarted = false;
 
            if (_me != null) {
                Thread tspeaker = _me;
                _me = null;
                try { 
Connect your IDE to all the code out there  Get Codota for Java