Code example for AudioTrack

Methods: flushreleasestop

0
	      for( int i = 0; i < samples.length; i++ )
	         buffer[i] = (short)(samples[i] * Short.MAX_VALUE);;
	   }	 
	    
	   public void stop() { 
		   track.flush();
		   track.stop();
		   track.release();
		    
	   } 
	}	 
	 
	 
	 
}    
Experience pair programming with AI  Get Codota for Java