Code example for Equalizer

Methods: release

0
    protected void onPause() { 
        super.onPause(); 
 
        if (isFinishing() && mMediaPlayer != null) {
            mVisualizer.release();
            mEqualizer.release();
            mMediaPlayer.release();
            mMediaPlayer = null;
        } 
    } 
} 
 
/** 
 * A simple class that draws waveform data received from a 
 * {@link Visualizer.OnDataCaptureListener#onWaveFormDataCapture } 
 */ 
class VisualizerView extends View {
    private byte[] mBytes;
    private float[] mPoints;
    private Rect mRect = new Rect();