It's unfortunate i got the same error, has anyone solved this anyway... i got <br>
chanawutsaelee857158 opened this issue · 2 comments
It's unfortunate i got the same error, has anyone solved this anyway... i got <br>
2021-06-18 19:11:54.504 24961-24961/com.bigger.bb E/AudioEffect: set(): AudioFlinger could not create effect e46b26a0-dddd-11db-8afd-0002a5d5c51b / �$���5�, status: -1 2021-06-18 19:11:54.504 24961-24961/com.bigger.bb E/visualizers-JNI: Visualizer initCheck failed -3 2021-06-18 19:11:54.505 24961-24961/com.bigger.bb E/Visualizer-JAVA: Error code -3 when initializing Visualizer. 2021-06-18 19:11:54.506 24961-24961/com.bigger.bb D/AndroidRuntime: Shutting down VM 2021-06-18 19:11:54.515 24961-24961/com.bigger.bb E/AndroidRuntime: FATAL EXCEPTION: main Process: com.bigger.bb, PID: 24961 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bigger.bb/com.bigger.bb.MainActivity}: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2819) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1623) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6548) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:451) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888) Caused by: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3 at android.media.audiofx.Visualizer.<init>(Visualizer.java:218) at com.bigger.bb.MainActivity.setupVisualizerFxAndUI(MainActivity.java:330) at com.bigger.bb.MainActivity.initView(MainActivity.java:145) at com.bigger.bb.MainActivity.onCreate(MainActivity.java:115) at android.app.Activity.performCreate(Activity.java:7044) at android.app.Activity.performCreate(Activity.java:7035) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2772) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1623) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6548) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:451) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)
Originally posted by @daves254 in #9 (comment)
It's unfortunate i got the same error, has anyone solved this anyway... i got <br>
2021-06-18 19:11:54.504 24961-24961/com.bigger.bb E/AudioEffect: set(): AudioFlinger could not create effect e46b26a0-dddd-11db-8afd-0002a5d5c51b / �$���5�, status: -1 2021-06-18 19:11:54.504 24961-24961/com.bigger.bb E/visualizers-JNI: Visualizer initCheck failed -3 2021-06-18 19:11:54.505 24961-24961/com.bigger.bb E/Visualizer-JAVA: Error code -3 when initializing Visualizer. 2021-06-18 19:11:54.506 24961-24961/com.bigger.bb D/AndroidRuntime: Shutting down VM 2021-06-18 19:11:54.515 24961-24961/com.bigger.bb E/AndroidRuntime: FATAL EXCEPTION: main Process: com.bigger.bb, PID: 24961 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bigger.bb/com.bigger.bb.MainActivity}: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2819) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1623) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6548) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:451) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888) Caused by: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3 at android.media.audiofx.Visualizer.<init>(Visualizer.java:218) at com.bigger.bb.MainActivity.setupVisualizerFxAndUI(MainActivity.java:330) at com.bigger.bb.MainActivity.initView(MainActivity.java:145) at com.bigger.bb.MainActivity.onCreate(MainActivity.java:115) at android.app.Activity.performCreate(Activity.java:7044) at android.app.Activity.performCreate(Activity.java:7035) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2772) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1623) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6548) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:451) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)
Originally posted by @daves254 in #9 (comment)
As mentioned in the note, you need to enable audio recording permission for your app from settings (or implement requesting the permission from user), this will fix the issue.
also, check that this library is intended for MediaPlayer not AudioPlayer.