需要有关无害化处理帮助 [英] Need help about sound processing

查看:111
本文介绍了需要有关无害化处理帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从立体声文件(.MP3)的采样数据,并将其推入缓冲区?
是否有与该函数的任何特定库?
很抱歉,如果真正的问题是菜鸟,我是很新的音频节目。

How to get the sample data from stereo sound file (.mp3) and push them into the buffer? Is there any specific library with that function? Sorry if the question is really noob, I'm very new to audio programming.

在此先感谢=)

推荐答案

你可以打通过直接的Andr​​oid API的MP3文件的唯一方式是MediaPlayer的是重量级的,缓慢的,presents只有高级别API。如果你需要混合或修改音频流或低延迟管理他们,你是你自己的。

(途经: HTTP: //mindtherobot.com/blog/624/android-audio-play-an-mp3-file-on-an-audiotrack/

所以这是不幸的。 JLayer是免费的,用Java编写的,所以你可以使用:

So that is unfortunate. JLayer is free and written in Java, so you can use that:

http://www.javazoom.net/javalayer/javalayer.html

无论是要足够快,取决于你要多少分析做的,是在手机,其他应用程序正在运行的是什么样的处理器。所有常用的东西。

Whether it's going to be fast enough depends on how much analysis you want to do, and what kind of processor is in the phone, what other apps are running. All the usual things.

您可以编写本地code和使用C / C ++库,如果你有什么CPU密集型,这将使​​你在做实时分析一个更好的机会:

You can write native code and use C/C++ libraries if you have something CPU intensive, which will give you a better chance at doing real-time analysis:

http://developer.android.com/sdk/ndk/overview.html

有些ARM处理器有向量指令等,你可以利用它们是否可用,这可以给一个速度提升:

Some ARM processors have vector instructions and the like you could exploit if they're available, which can give a speed boost:

http://www.arm.com/products/processors/technologies/ neon.php

如果你正在做的事情不可能是纯粹的实时,你可能会考虑做全部或部分pre-处理。然后缓存分析信息,因此用户只需要等待第一次......或者给他们的选项,让您的应用程序在一夜之间分析所有的文件或诸如此类。

If what you're doing can't be pure real-time, you might consider doing full or partial pre-processing. Then cache the analysis info so the user only has to wait the first time...or give them the option to let your app analyze all the files overnight or somesuch.

这篇关于需要有关无害化处理帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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