SoundTouch在Android? [英] SoundTouch on Android?

查看:539
本文介绍了SoundTouch在Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我试图改变音频文件的音调在Android应用程序。

Hey, I am trying to change the pitch of an audio file in an android application.

我发现了一个开源库在线SoundTouch(http://www.surina.net/soundtouch),你认为我可以在一个Android应用程序使用这个库?

I have found an open source library online "SoundTouch" (http://www.surina.net/soundtouch), do you think I can use this library in an android app?

我一直在谷歌搜索SoundTouch中的Java一看这个数据(http://www.aplu.ch/classdoc/jaw/ch/aplu/jaw/SoundTouch.html)。

I have been Googling "SoundTouch in Java" an have found this data (http://www.aplu.ch/classdoc/jaw/ch/aplu/jaw/SoundTouch.html).

可能这个库,我可以使用或任何其他库或过程中的任何想法,我可以用它来改变在Android上的音频文件的音调?我也看了到Java声音API的Andr​​oid不支持他们。 :/

Possible this library I can use or any ideas about any other libraries or process I can use to alter the pitch of an audio file on android? I have also looked into the Java Sound API an android does not support them. :/

谢谢 亚当

推荐答案

你有没有想过只是改变采样率是多少?如果加载原始音频采样到内存中,并使用Android的AudioTrack类播放它们,您可以指定各种可能的采样率和Android将重采样为您服务。这将改变双方的音调和节奏,喜欢玩的记录在错误的速度。如果您确实需要改变音高,而不会影响速度,你需要SoundTouch或类似的东西。

Have you thought about just changing the sample rate? If you load the raw audio samples into memory and play them using Android's AudioTrack class, you can specify a wide range of possible sample rates and Android will resample for you. This will change both the pitch and tempo, like playing a record at the wrong speed. If you absolutely need to change the pitch without affecting the tempo, you'll need SoundTouch or something similar.

无论如何,这是绝对有可能的,但它会采取的工作相当数量的。

Anyway, this is definitely possible, but it will take a fair amount of work.

您需要使用Android NDK(原生开发套件)来编译SoundTouch。你找到了Java包装可能会有所帮助,但最终你需要让你的手脏与NDK。

You'll need to use the Android NDK (native development kit) to compile SoundTouch. The Java wrapper you found might be helpful, but ultimately you'll need to get your hands dirty with the NDK.

您还需要编写自己的code从磁盘中读取的音频文件,然后通过SoundTouch并通过了AudioTrack类的缓冲吧。 MediaPlayer的不会帮助你在这里。

You'll also need to write your own code to read the audio file from disk, and then buffer it through SoundTouch and out through the AudioTrack class. MediaPlayer won't help you here.

最后,请注意,你需要的LGPL条款发布您的应用程序时要遵守。

Finally, note that you'll need to abide by the terms of the LGPL when releasing your app.

这篇关于SoundTouch在Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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