如何创建均衡器为Android [英] How to create equalizer for android

查看:375
本文介绍了如何创建均衡器为Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建简单的均衡器为Android。我该怎么办呢?

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

试着找到的MediaPlayer类的一些方法。但我所有的尝试都失败了。

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

推荐答案

答案很简单...你不能与框架或使用Java做(因为在Android中没有JMF支持)。你必须使用NDK和JNI来编译均衡器支持本地库。如果你知道C / C ++有很多周围的图书馆将提供这一功能,但如果你不知道C / C ++或者花钱找人,做我会建议你移动到在你的手段别的办法.. 。如果你看看周围甚至有一些工作实例为Android,即使用libmpg123 ......但libmpg123只提供了均衡器界面的MP3。我发现,这是一般的pretty的越野车,并以这样一种方式,它会锁定Android和我必须拔电池重启手机损害了应用程序的稳定性。另外,有很多的音频剪辑甚至与均衡器flatlined。这是我的经验...

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

这篇关于如何创建均衡器为Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆