How to create equalizer for android

后端 未结 3 1761
天涯浪人
天涯浪人 2020-12-14 09:31

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.

相关标签:
3条回答
  • 2020-12-14 10:00

    I hope that below link is useful for you.

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

    0 讨论(0)
  • 2020-12-14 10:15

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

    0 讨论(0)
  • 2020-12-14 10:19

    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

    0 讨论(0)
提交回复
热议问题