How to create equalizer for android
Asked Answered
A

3

19

I want to create simple equalizer for android. How can I do it?

Try to find some methods in MediaPlayer class. But all my attempts failed.

Ahimsa answered 5/8, 2010 at 22:7 Comment(3)
You are going to have to come up with a more specific question to get a good answer here. What exactly did you try? what failed about it? What exactly are you trying to accomplish?Behavior
I'm writing media player for android. And I need to create Equalizer for it. I can't find any standard ways to modify audio stream in Android. I found some J2SE equalizer libruary. But it using J2SE specific classes.Ahimsa
Hi, I am looking for the same implementation. Please provide me some basic idea how to implement this?Halfon
M
5

Simple answer... you can't do it with the framework or with Java (because there is no JMF support in Android). You have to use the NDK and JNI to compile a native library with equalizer support. If you know C/C++ there are plenty of libraries around that will provide this functionality but if you don't know C/C++ or have the means to pay someone that does I would recommend you move on to something else within your means... There are even some working examples for Android, if you look around, that use libmpg123... but libmpg123 only provides an equalizer interface for mp3's. I found that it's pretty buggy in general and compromised the stability of the app in such a way that it would lock up android and I would have to pull the battery to reboot the phone. In addition, there was alot of audio clipping even with the equalizer flatlined. That is my experience...

Mellott answered 6/8, 2010 at 2:56 Comment(2)
HI, Thanks for this comment, but I have search more times for c/c++ library for android equalizer but can't find. If you will support then I think my issue would be resolve, kindly requested to you, If you have few time for helping, please share some information for library. Thanks again...Tessera
use equalizer class broSldney
V
18

Android has built-in qualizer engine, though it isn't located in MediaPlayer class, becouse it's a class itself located in android.media.audioFx package.

http://developer.android.com/reference/android/media/audiofx/Equalizer.html

Vostok answered 18/4, 2012 at 16:16 Comment(2)
Thanks. But it works only for Android versions <= 2.3. It's not so critical now, of cause.Ahimsa
@Ahimsa yes you are right.If u fix this problem means please help meJudah
M
5

Simple answer... you can't do it with the framework or with Java (because there is no JMF support in Android). You have to use the NDK and JNI to compile a native library with equalizer support. If you know C/C++ there are plenty of libraries around that will provide this functionality but if you don't know C/C++ or have the means to pay someone that does I would recommend you move on to something else within your means... There are even some working examples for Android, if you look around, that use libmpg123... but libmpg123 only provides an equalizer interface for mp3's. I found that it's pretty buggy in general and compromised the stability of the app in such a way that it would lock up android and I would have to pull the battery to reboot the phone. In addition, there was alot of audio clipping even with the equalizer flatlined. That is my experience...

Mellott answered 6/8, 2010 at 2:56 Comment(2)
HI, Thanks for this comment, but I have search more times for c/c++ library for android equalizer but can't find. If you will support then I think my issue would be resolve, kindly requested to you, If you have few time for helping, please share some information for library. Thanks again...Tessera
use equalizer class broSldney
H
3

I hope that below link is useful for you.

https://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/media/AudioFxDemo.html

Haze answered 20/9, 2011 at 5:13 Comment(1)
I used the same classes from the sample example. Getting java.lang.UnsupportedOperationException: AudioEffect: invalid parameter operation error on nougat.Equalitarian

© 2022 - 2024 — McMap. All rights reserved.