armen101 / audiorecordview Goto Github PK
View Code? Open in Web Editor NEWA flexible, efficient library written in Kotlin for drawing real wave forms while recording. Free, easy and convenient to use.
License: Apache License 2.0
A flexible, efficient library written in Kotlin for drawing real wave forms while recording. Free, easy and convenient to use.
License: Apache License 2.0
In Android Version 8, when we record audio second time then waves are not generating. if you have any solution then give me a suggestion.
Thanks for your nice library
At the moment AudioRecordView removes previous data when the new data came and there is no space. But I think it would be a good idea to keep the old data and scroll horizontally the you can also use it to show the progress of playback.
you can fill the wave bars with another color like how telegram do that on playing voices:
https://telegram.org/file/811140497/169b/cbXkJ0EYq8I.90727/d8b1bbc78a215054df
(Actually telegram not shows this UI on voice record it shows that on playback)
Hi,
thanks for your nice library.
There is a problem which occurs by calling update after orientation changes
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.remove(ArrayList.java:503) at com.visualizer.amplitude.AudioRecordView.handleNewFFT(AudioRecordView.kt:125) at com.visualizer.amplitude.AudioRecordView.update(AudioRecordView.kt:77)
Hello,
is there any way to play the recorded file using the same wave? or is there a way to load the wave with a file?
It seems that if update
is called while the view's height is 0 (which can happen if the view is GONE
or before it is properly rendered) it causes it to stop working properly - no matter what amplitude is passed it will just show as a straight bar.
It looks like this is happens because the chunkMaxHeight
is (incorrectly) recalculated here as it will be greater than the height (minus padding) and fire the else if
. When the view is displayed and the height updates to the correct value the chunkMaxHeight
will not be recalculated, and so we're stuck with the incorrect value.
Our workaround at the moment is to skip calls to update
when AudioRecordView#getHeight()
is 0:
if (audioRecordView.getHeight() > 0) {
audioRecordView.update(amplitude);
}
How to change direction? chunkX is not easy to change
I don't want it to move left or right, it should be in place and only bars will go up or down.
Please implement something like direction = 0
@Armen101 I think there is no option available for stopping it's horizontal movement .
Hence, please reopen this issue
Originally posted by @SomnathS09 in #16 (comment)
when I add AudioRecordView as my project dependencies, I got this error:
Could not find androidx.appcompat:appcompat:1.2.0. Searched in the following locations: - https://jitpack.io/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.pom - https://jitpack.io/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.jar - https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.pom - https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.jar - https://jcenter.bintray.com/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.pom - https://jcenter.bintray.com/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.jar - https://repo.maven.apache.org/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.pom - https://repo.maven.apache.org/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.jar Required by: project :app > com.github.Armen101:AudioRecordView:1.0.5
with shorter intervals of updating, the view fails to show the right amplitude
I am interested can I use this library to play media after recording and visualize it? Thanks :)
After using this library I am getting this error and app crashes. But there is no any specific case, it happens rarely. I am using 1.0.2 version.
Fatal Exception: java.lang.IllegalStateException: View with id 16908290: androidx.appcompat.widget.ContentFrameLayout#onMeasure() did not set the measured dimension by calling setMeasuredDimension()
at android.view.View.measure(View.java:23209)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6753)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
at android.view.View.measure(View.java:23196)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6753)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:23196)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6753)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
at android.view.View.measure(View.java:23196)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6753)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:720)
at android.view.View.measure(View.java:23196)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2802)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1647)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1930)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1535)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7405)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1044)
at android.view.Choreographer.doCallbacks(Choreographer.java:839)
at android.view.Choreographer.doFrame(Choreographer.java:774)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1030)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Hello Author, Can you please upgrade the library for compilerSDKVersion 31
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.