bogerchan / nier-visualizer Goto Github PK
View Code? Open in Web Editor NEWA lightweight and efficient Android visual library.
License: Apache License 2.0
A lightweight and efficient Android visual library.
License: Apache License 2.0
终于找到你了,做得很棒,声音反应也实时够快!比Github上其他Android的库都好,而且还是
kotlin写的,完全满足我的需求,谢谢。
能不能做个时域的效果,就是类似ios中语音备忘录那样的效果。
现在好像都是频域的效果吧?
Hi,
I am using your library and got more than 1k bugs from different devices in crashlytics.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{coders.hub.fm.radio/com.radios.india.RadioStationActivity}: java.lang.IllegalStateException: setCaptureSize() called in wrong state: 2
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2875)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2950)
at android.app.ActivityThread.-wrap11(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1616)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6759)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
and second logcat:-
Caused by java.lang.IllegalStateException: setCaptureSize() called in wrong state: 2
at android.media.audiofx.Visualizer.setCaptureSize(Visualizer.java:315)
at me.bogerchan.niervisualizer.NierVisualizerManager.init(Unknown Source:11)
at com.radios.india.RadioStationActivity.setVisual(Unknown Source:15)
at com.radios.india.RadioStationActivity.onCreate(Unknown Source:340)
at android.app.Activity.performCreate(Activity.java:6980)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2828)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2950)
at android.app.ActivityThread.-wrap11(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1616)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6759)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Other one...
Fatal Exception: java.lang.NoSuchMethodError: android.media.audiofx.Visualizer.setScalingMode
at me.bogerchan.niervisualizer.NierVisualizerManager.init(Unknown Source)
at com.radios.india.RadioStationActivity.setVisual(Unknown Source)
at com.radios.india.RadioStationActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:4470)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(NativeStart.java)
Please check and let me know.
hi
i need to use LineRenderer but i need fixed start point and end point. how can i do it?
RT
准确的说是在录音情况下,这十种动画效果里,所有包含1,2,3,5,7效果的都不会起作用
Hi,
Can you tell me how to increase the height of the ColumnarType1Renderer. Becaue in low voice situation animation is not visible at all
Thanks
Asanka
How can I change NierVisualizerManager background to transparent color?
Hi
I doing custom ColumnarType1Renderer implement IRenderer. I want to set LinearGradient but i don't know position x0, y0, x1, y1 of wave ColumnarType1Renderer.
mPaint.shader = LinearGradient(
0f,
0f,
0f,
0f,
Color.parseColor("#FF7050"),
Color.parseColor("#B42F8F"),
Shader.TileMode.MIRROR
)
So. I want to know position to set gradient wave music ColumnarType1Renderer. Please , help me
Tks so much
Can it draw in a item of Recycle view? I tried but it did not show anything when recording.
Hi. Thanks for this amazing Visualizer.
In the past it worked for me. But for my new app, I am not sure why it happens. I provided a valid audio session ID but still it gives this error. I am on Android 10.
Here is the code
NierVisualizerManager visualizerManager = new NierVisualizerManager();
visualizerManager.init(audioTrack.getAudioSessionId());//this is valid ID. I checked
visualizerManager.start(binding.surfaceView, new IRenderer[]{new ColumnarType1Renderer()});
2021-01-27 17:19:20.868 6620-6620/com.x_bytes E/AudioEffect: set(): AudioFlinger could not create effect e46b26a0-dddd-11db-8afd-0002a5d5c51b / `x��}, status: -1
2021-01-27 17:19:20.868 6620-6620/com.x_bytes E/visualizers-JNI: Visualizer initCheck failed -3
2021-01-27 17:19:20.868 6620-6620/com.x_bytes E/Visualizer-JAVA: Error code -3 when initializing Visualizer.
2021-01-27 17:19:20.869 6620-6620/com.x_bytes D/AndroidRuntime: Shutting down VM
2021-01-27 17:19:20.872 6620-6620/com.x_bytes E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.x_bytes, PID: 6620
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.x_bytes/com.x_bytes.ModernAudio}: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)
Caused by: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3
at android.media.audiofx.Visualizer.(Visualizer.java:257)
at me.bogerchan.niervisualizer.NierVisualizerManager.init(NierVisualizerManager.kt:42)
at com.x_bytes.ModernAudio.onCreate(ModernAudio.java:82)
at android.app.Activity.performCreate(Activity.java:7824)
at android.app.Activity.performCreate(Activity.java:7813)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)
Hi Sir,
I think Visualizer not working properly for AudioFormat.ENCODING_PCM_16BIT configuration.
Can you support it?
Thanks,
kotlin.UninitializedPropertyAccessException: lateinit property mDestWaveData has not been initialized
at me.bogerchan.niervisualizer.util.KeyFrameMaker.updateWaveData(KeyFrameMaker.kt:32)
at me.bogerchan.niervisualizer.core.NierVisualizerRenderWorker.processUpdateWaveEvent(NierVisualizerRenderWorker.kt:118)
at me.bogerchan.niervisualizer.core.NierVisualizerRenderWorker.access$processUpdateWaveEvent(NierVisualizerRenderWorker.kt:22)
at me.bogerchan.niervisualizer.core.NierVisualizerRenderWorker$mRenderHandler$2$1.handleMessage(NierVisualizerRenderWorker.kt:56)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.os.HandlerThread.run(HandlerThread.java:67)
Hi,
Please check the below error:-
Fatal Exception: java.lang.NoSuchMethodError: android.media.audiofx.Visualizer.setScalingMode
at me.bogerchan.niervisualizer.NierVisualizerManager.init(Unknown Source)
at com.radios.india.RadioStationActivity.setVisual(Unknown Source)
at com.radios.india.RadioStationActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:4470)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(NativeStart.java)
Animation is still running after audio stop. Animation should stop and play according to Audio stop/play same as I am using Wave visualization project from github.
can it be applied to radio streaming ?
curently default background color is black,is it posible to change? if yes,how ?
Hi! This library is awesome. Thank you for that!
I'm working in a project which I need to use a CircleSolidRenderer customized and below that I need to put an ColumnType4Renderer. My problem is that I need both work together, I mean, both shoudl be started by a NierVisualizerManager. I coudn't start them by the same manager and neighter by two separeted managers (using the same media player, only one animation is started)
Could you help me? Is it possible?
How we can save audio while recording
会添加鲸云音效那种炫酷的效果吗
Visualizer works fine when we play the audio from the Media Player Style but when I play the Audio Record Style, the visualizer is not working.
Could you please help me to fix the issue?
Hi, thank for create this library
I want export the wave sound to mp4 file.
Can you help me?
How to get output from mp4 file from library?
Hi,
The visualisers are working fine with audio files but doesn't seem to work well with recording audio. Like ColumnarType4Renderer(FFT) is not working when recording audio from mic/speaker.
When I try using this along with MediaRecorder as follows:
this.nierVisualizerManager = new NierVisualizerManager();
this.nierVisualizerManager.init(1); // For MIC inout - Is that the right value?
this.nierVisualizerManager.start(this.audioVisualizer,new IRenderer[]{new CircleRenderer(true),new CircleBarRenderer(),new ColumnarType4Renderer()});
I see no activity getting registered in the view, the view stays static.
Does it support the MIC input channel for showing Visualization or is it meant only for Audio Output.
First of all, thanks for the effort you did here but I have one question, I want to generate these effects to video is there a way we can follow.
如上, 如果要画一写复杂的图形(如果早些的那些可视化库), 可否用这些软件代替, 然后用库的方式导入, 目前我知道可用Lottie把 Adobe After Effects制作的动画转换成json导入到项目中, 到好像接口有限, 不能具体控制...
是不是我没找对地方....
Visualizer not working properly for AudioFormat.ENCODING_PCM_16BIT configuration. However its working fine for 8 bit config.
我曾经尝试过,但是不行,只好放弃使用了。主要用作播放语音消息时,这个时候如果弹窗需要获取录音权限会给用户带来误解的。希望作者能够支持一下,谢谢!
Is there a way to change the color visualizer?
When i call mVisualizerManager?.stop() and mVisualizerManager?.release(), i expect it to reset to original position, but it suddenly stop. how to reset the view to zero line after stop pls help
I am playing a music from a streaming website and run into this error:
Caused by: java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3
Does your library support streaming audio?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.