English 中文(简体)
如何在 Android 中设置音频平衡器
原标题:How to set audio equalizer in Android

我正在制作一个媒体播放器, 需要使用“ 搜索棒” 来设置平衡效果, 使用“ 回收棒 ” 、 “ 可怕的 ” 、 “ 洛克 ” 、 “ Pop ” 、 “ Medium ” 。 我有一个链接, 用于做这个操作的一些 NDK 库。 是否有任何 Java 图书馆可以这样做, 请解释这样做的逻辑 。

 @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.equalizertab);


      f
   }
  } else {
   try {
    ((GlobalState) getApplicationContext())
      .resetEQ();
   } catch (RemoteException re) {
    // TODO:
   }
  }
 }
});

以下的日志标记 :

05-25 11:52:16.630: E/AndroidRuntime(19088): FATAL EXCEPTION: main
05-25 11:52:16.630: E/AndroidRuntime(19088): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.apis.media/com.example.android.apis.media.AudioFxDemoActivity}: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -1
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1818)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.app.ActivityThread.access$500(ActivityThread.java:122)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.os.Looper.loop(Looper.java:132)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.app.ActivityThread.main(ActivityThread.java:4126)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at java.lang.reflect.Method.invokeNative(Native Method)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at java.lang.reflect.Method.invoke(Method.java:491)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at dalvik.system.NativeStart.main(Native Method)
05-25 11:52:16.630: E/AndroidRuntime(19088): Caused by: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -1
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.media.audiofx.Visualizer.<init>(Visualizer.java:182)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at com.example.android.apis.media.AudioFxDemoActivity.setupVisualizerFxAndUI(AudioFxDemoActivity.java:151)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at com.example.android.apis.media.AudioFxDemoActivity.onCreate(AudioFxDemoActivity.java:53)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
05-25 11:52:16.630: E/AndroidRuntime(19088):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
最佳回答

您可以在 AudioFxDemo 类中找到均衡器 。

这是您可以找到 工作权限的链接 :

< a href=" "https://stackoverflow.com/ questions/8595692/and mild-visaizer-toppulation-crash" > Android Feelphizer 实施崩溃

问题回答

暂无回答




相关问题
Playing a Sound With Monotouch

No matter what I try (build -> content, NSUrl, filename) I get a null exception : file not found when I try to play a .caf sound file in monotouch. //var path = NSBundle.MainBundle.PathForResource("...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

Play sound in iPhone web app with Javascript?

I m currently creating an iPhone web application for piano chords, and I wanted to add an option that would let the user press a Play button and play the selected chord. However, I m not sure how to ...

热门标签