Code example for AudioTrack

Methods: getPlayStateplaywrite

    void playSound(byte[] buf, int size) {  
    	//Start the track if it isn't already playing 
    	//Write the buffer to the AudioTrack 
        track.write(buf, 0, size);
    //Native functions 
    private native void createEngine(); 
    private native void playURL(String file, byte[] array);
    public native void cancel(); 
    /** Load jni .so on initialization*/  
    static { 
Connect your IDE to all the code out there  Get Codota for Java