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.

MistaGreen
  • 798
  • 1
  • 7
  • 15
  • 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 Aug 05 '10 at 22:17
  • 3
    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. – MistaGreen Aug 05 '10 at 22:39
  • Hi, I am looking for the same implementation. Please provide me some basic idea how to implement this? – AndiM Jul 25 '16 at 11:39

3 Answers3

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

dren311
  • 181
  • 1
  • 3
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...

androidworkz
  • 2,902
  • 1
  • 19
  • 19
  • 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 May 14 '12 at 10:55
  • use equalizer class bro –  Sep 15 '16 at 12:54
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

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Ramesh Akula
  • 5,720
  • 4
  • 43
  • 67
  • 1
    I used the same classes from the sample example. Getting java.lang.UnsupportedOperationException: AudioEffect: invalid parameter operation error on nougat. – AkhilGite Dec 05 '16 at 06:06