gpt4 book ai didi

android - Android 4.0.3+ 上的全局音频和 session ID

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:17:29 25 4
gpt4 key购买 nike

我在市场上有一个应用程序可以将低音增强效果应用于全局音频混合。不幸的是, Audio Session 0 的使用自 4.0.3 以来已被弃用,我一直无法找到解决方法。有没有办法扫描 Audio Session ID?这是我的日志:

10-16 20:58:01.569: E/AndroidRuntime(645): FATAL EXCEPTION: main
10-16 20:58:01.569: E/AndroidRuntime(645): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.rustlesoft.bassbooster/com.rustlesoft.bassbooster.BassBooster}: java.lang.IllegalArgumentException: Effect type: 0634f220-ddd4-11db-a0fc-0002a5d5c51b not supported.
10-16 20:58:01.569: E/AndroidRuntime(645): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.app.ActivityThread.access$600(ActivityThread.java:130)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.os.Handler.dispatchMessage(Handler.java:99)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.os.Looper.loop(Looper.java:137)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.app.ActivityThread.main(ActivityThread.java:4745)
10-16 20:58:01.569: E/AndroidRuntime(645): at java.lang.reflect.Method.invokeNative(Native Method)
10-16 20:58:01.569: E/AndroidRuntime(645): at java.lang.reflect.Method.invoke(Method.java:511)
10-16 20:58:01.569: E/AndroidRuntime(645): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-16 20:58:01.569: E/AndroidRuntime(645): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-16 20:58:01.569: E/AndroidRuntime(645): at dalvik.system.NativeStart.main(Native Method)
10-16 20:58:01.569: E/AndroidRuntime(645): Caused by: java.lang.IllegalArgumentException: Effect type: 0634f220-ddd4-11db-a0fc-0002a5d5c51b not supported.
10-16 20:58:01.569: E/AndroidRuntime(645): at android.media.audiofx.AudioEffect.<init>(AudioEffect.java:381)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.media.audiofx.BassBoost.<init>(BassBoost.java:101)
10-16 20:58:01.569: E/AndroidRuntime(645): at com.rustlesoft.bassbooster.BassBooster.<init>(BassBooster.java:14)
10-16 20:58:01.569: E/AndroidRuntime(645): at java.lang.Class.newInstanceImpl(Native Method)
10-16 20:58:01.569: E/AndroidRuntime(645): at java.lang.Class.newInstance(Class.java:1319)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
10-16 20:58:01.569: E/AndroidRuntime(645): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
10-16 20:58:01.569: E/AndroidRuntime(645): ... 11 more

最佳答案

它可能已被弃用,但只要您有 MODIFY_AUDIO_SETTINGS 权限并且您没有,对全局输出混合( session 0)应用效果在 ICS 和 JB 中仍然有效t 还对 0 以外的 session 应用任何效果。

关于android - Android 4.0.3+ 上的全局音频和 session ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12888585/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com