Code example for Equalizer

Methods: setEnabled

0
      throw new NullPointerException("Cannot link to null MediaPlayer");
    } 
 
    // Create the Visualizer object and attach it to our media player. 
    mVisualizer = new Visualizer(player.getAudioSessionId());
    Equalizer mEqualizer = new Equalizer(0, player.getAudioSessionId());
    mEqualizer.setEnabled(true);
    mVisualizer.setCaptureSize(Visualizer.getCaptureSizeRange()[1]);
 
    // Pass through Visualizer data to VisualizerView 
    Visualizer.OnDataCaptureListener captureListener = new Visualizer.OnDataCaptureListener()
    { 
      @Override 
      public void onWaveFormDataCapture(Visualizer visualizer, byte[] bytes,
          int samplingRate)
      { 
        updateVisualizer(bytes);
      } 
 
      @Override 
      public void onFftDataCapture(Visualizer visualizer, byte[] bytes,