Android examples for android.media:Audio
Get audio Range
public class Main { public static short audioRange(short[] track) { // Returns largest amplitude ("volume") of an audio track short range = 0; for (int i = 0; i < track.length; i++) { if (Math.abs(track[i]) > range) range = (short) Math.abs(track[i]); }/*from w w w . jav a 2 s .c o m*/ return range; } }