How to create equalizer for android



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.


Posted 2010-08-05T22:07:44.390

Reputation: 578

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? – Cheryl Simon – 2010-08-05T22:17:26.793

2I'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. – MistaGreen – 2010-08-05T22:39:36.103

Hi, I am looking for the same implementation. Please provide me some basic idea how to implement this? – AndiM – 2016-07-25T11:39:48.277



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...


Posted 2010-08-05T22:07:44.390

Reputation: 2 774

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... – Manoj Kumar – 2012-05-14T10:55:10.780

use equalizer class bro – Learner – 2016-09-15T12:54:21.743


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


Posted 2010-08-05T22:07:44.390

Reputation: 131

2Thanks. But it works only for Android versions <= 2.3. It's not so critical now, of cause. – MistaGreen – 2013-05-07T00:22:44.297

@MistaGreen yes you are right.If u fix this problem means please help me – Android_kalai – 2014-08-18T05:50:36.187


You can create a equalizer like

Equalizer equalizer = new Equalizer(0,mediaplayer.getAudioSessionId());


equalizer.getNumberOfBands(); //it tells you the number of equalizer in device.

equalizer.getNumberOfPresets();//like Normal Classic,Dance Flat,Folk Heavy Metal,Hip Hop,Jazz, Pop, Rock

Have a look at full example

Xar E Ahmer

Posted 2010-08-05T22:07:44.390

Reputation: 22 433

getting error on android nougat. – AkhilGite – 2016-12-05T03:59:26.117

what error you are getting. Send some log. – Xar E Ahmer – 2016-12-05T05:26:49.340

you can see here link. I asked a question on stackoverflow

– AkhilGite – 2016-12-05T06:01:48.103

java.lang.UnsupportedOperationException: AudioEffect: invalid parameter operation – AkhilGite – 2016-12-05T06:02:43.520


Ramesh Akula

Posted 2010-08-05T22:07:44.390

Reputation: 5 056

I used the same classes from the sample example. Getting
java.lang.UnsupportedOperationException: AudioEffect: invalid parameter operation error on nougat.
– AkhilGite – 2016-12-05T06:06:16.843