title: AudioFlinger could not create effect, status: -22
body: <p>Help me please, how fix this?</p>
  
  <pre><code>public class VisualizerCapture extends Activity implements Visualizer.OnDataCaptureListener
  private Visualizer mVisualizer;
  
  
  @Override
  public void onCreate(Bundle savedInstanceState){
   super.onCreate(savedInstanceState);
      mVisualizer = new Visualizer(0);
      setupVisualizer();
  
  private void setupVisualizer() {
      mVisualizer.setEnabled(false);
      mVisualizer.setCaptureSize(8);      //test
      mVisualizer.setDataCaptureListener(this,250,false,true);        
              Log.v("ABS","setupVisualizer" + mVisualizer.getEnabled());    //log
  </code></pre>
  
  <p>This code throws error:
  ERROR/AudioEffect(2393): set(): AudioFlinger could not create effect, status: -22</p>
  
  <p>that was in xml </p>
  
  <pre><code> &lt;uses-permission android:name="android.permission.RECORD_AUDIO"/&gt;             
  &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/&gt;
  </code></pre>
  
  <p>logcat:</p>
  
  <p>java.lang.RuntimeException: Unable to start activity ComponentInfo{blabla}: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -4
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
          at android.app.ActivityThread.access$600(ActivityThread.java:123)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
          at android.os.Handler.dispatchMessage(Handler.java:99)
          at android.os.Looper.loop(Looper.java:137)
          at android.app.ActivityThread.main(ActivityThread.java:4424)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:511)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
          at dalvik.system.NativeStart.main(Native Method)
          Caused by: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -4
          at android.media.audiofx.Visualizer.(Visualizer.java:182)
          at com.blablabeta.gui.VisualizerCapture.onCreate(EqVisualizerCaptureAudio.java:27)
          at android.app.Activity.performCreate(Activity.java:4465)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)</p>
  
  <p>That is it?
  and how to fix this error?</p>