[英]Fast conversion from mp3 to WAV on Android
I am trying to convert a mp3 file into WAVE format in my Android application. 我正在尝试在Android应用程序中将mp3文件转换为WAVE格式 。 This operation should take little time, as the application is social, and it is not acceptable for the user to wait for too long.
由于该应用程序是社交应用程序,因此此操作应该花费很少的时间,并且用户等待太长时间是不可接受的。
So here is where I am : 所以这是我的位置:
I have already tried to use JLayer (proposed in a similar question Convert mp3 to wav on Android ), but the conversion is too slow: it takes about 40 seconds for a 2 minutes mp3 file. 我已经尝试使用JLayer(在类似的问题( 在Android上将mp3转换为wav )中提出),但转换速度太慢:一个2分钟的mp3文件大约需要40秒。
Concerning the library LAME (as in Lame4Android ), I also tried it (with Android NDK) but the result is still too slow (15s to 10s). 关于库LAME(如Lame4Android一样 ),我也尝试了它(使用Android NDK),但结果仍然太慢(15s至10s)。
I came across another library: JUCE , but it is too vast, and including the entire library in the project in order to do that simple conversion seems a bit... excessive. 我遇到了另一个库: JUCE ,但是它太大了,为了进行简单的转换,将整个库包括在项目中似乎有点...过分。 And I am also afraid it will slow the application.
而且我还担心它会减慢应用程序的速度。
So what I am currently looking for is a C/C++ library to use in order to do that. 因此,我目前正在寻找的是要使用的C / C ++库。 Do you know any fast libraries?
你知道快速图书馆吗?
Thank you. 谢谢。
Not sure if the license will work for you (GPLv2), but have you considered libmad ? 不知道许可证是否对您有用 (GPLv2),但是您是否考虑过libmad ?
As I understand it, there's not a NDK build available for download, but here is a page describing how to make one yourself... 据我了解,没有NDK版本可以下载,但是这里有一个页面介绍如何制作自己的游戏...
Another option is libmpg123 , which is LGPLv2.1. 另一个选项是libmpg123 ,它是LGPLv2.1。 The same blog has an article describing how to use it in Android.
同一博客上有一篇文章描述了如何在Android中使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.