Comments (10)
It can be used for audio recording too, for that you can use setRawAudioBytes(byte[])
Yes, you guessed it right. Actually, this library is based on Visualizer class in audiofx, and Microphone permissions are required by it.
https://developer.android.com/reference/android/media/audiofx/Visualizer
Hope this answers your question!
from audio-visualizer-android.
I don't understand. If it's not needed, why request the permission? What is the purpose of the permission, if it already has all the data within the audio file?
Can you please put into the sample of how to make it work with the recorder, as you record and maybe also before you record (meaning when it's idle) ?
from audio-visualizer-android.
The Visualizer class requires the Microphone permissions, as it takes data from the stream playing. This class is provided by the android.media package, and the permission is compulsory for it to work.
You are right when you say data is already available in the audio file. We can also extract the data from the file, do some FFT, normalization and make it work without the permission. But, for that I will have to write a complete custom implementation of extracting the audio data and managing. I went with the Visualizer class to reduce the complexity and the work load, but the library can surely be improved. I just don't have time to do that right now.
Regarding sample, I will get on it ASAP.
from audio-visualizer-android.
It's just that a visualizer on audio files can be used on music players, but it's weird to request a microphone permission for this...
I tried to make noise while it played, to see if it affected it, as I thought that's why it requested the permission...
So I think that currently, the only usage for this library would usually be of recording apps, though it could be used on such apps in all recording steps (before, during, and while playing).
from audio-visualizer-android.
I've also noticed that if I change the volume level to 0, I don't see the visualizer do anything anymore.
Is this intentional? Could it be changed?
from audio-visualizer-android.
Nope, it can't be changed, but would be possible using custom implementation. I will see if I can pull some time to implement the custom version of the library.
from audio-visualizer-android.
By "custom implementation" , you mean something that will look at the audio data directly, without the need for microphone ?
from audio-visualizer-android.
Yeah correct.
from audio-visualizer-android.
Cool. Thank you for your time. I hope you succeed.
from audio-visualizer-android.
Supposing we have a recorder that goes like this:
try {
recorder.prepare();
recorder.start();
} catch (IOException e) {}
where should we put the setRawAudioBytes(byte[]) to have it display in real-time?
from audio-visualizer-android.
Related Issues (20)
- Circle Line Visualiser effect in Swift for iOS
- Audio visualizer not showing the visualization even when audio session Id passed HOT 4
- Cannot initialize Visualizer engine, error: -3 HOT 6
- A sub feature to the library, to attain sound data amplitudes
- How to use this library with live recording HOT 2
- Class referenced in the layout file, `com.gauravk.audiovisualizer.visualizer.BarVisualizer`, was not found in the project or the libraries HOT 4
- this is not working for system audio music by playing other player HOT 1
- App crashed while trying to get reference of java class HOT 1
- provide this on mavencentral HOT 1
- dependencies error in android studio HOT 1
- Audio
- java.lang.ClassCastException: com.gauravk.audiovisualizer.visualizer.BlastVisualizer HOT 3
- issues are pending,Please help me to resolve it. HOT 3
- java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaPlayer.start()' on a null object reference HOT 4
- Cannot resolve class com.gauravk.audiovisualizer.visualizer.BarVisualizer HOT 2
- Failed to resolve: com.gauravk.audiovisualizer:audiovisualizer:0.9.2 HOT 5
- implementation 'com.gauravk.audiovisualizer:audiovisualizer:0.9.2' HOT 3
- when i add "com.gauravk.audiovisualizer.visualizer.BlastVisualizer" to my XML Layout file. My design in the Split is disappear. How can I fix that ? HOT 3
- Failed to instantiate one or more classes
- visualizer not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audio-visualizer-android.