如何使用音频单元在iPhone [英] How to use an Audio Unit on the iPhone

查看:200
本文介绍了如何使用音频单元在iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方式来改变录制音频的音调,因为它保存到磁盘,或播放(实时)。我明白了音频单元,可以用于此目的。 iPhone提供了音频单元有限的支持(例如它无法创建/使用自定义音频单元,据我可以告诉),但一些外的开箱音频单元可供选择,其中之一是AUPitch。

I'm looking for a way to change the pitch of recorded audio as it is saved to disk, or played back (in real time). I understand Audio Units can be used for this. The iPhone offers limited support for Audio Units (for example it's not possible to create/use custom audio units, as far as I can tell), but several out-of-the-box audio units are available, one of which is AUPitch.

我究竟是如何使用音频单元(特别是AUPitch)?你把它挂到音频队列不知何故?是有可能链音频单元一起(例如,同时添加的回声效应和间距的变化)?

How exactly would I use an audio unit (specifically AUPitch)? Do you hook it into an audio queue somehow? Is it possible to chain audio units together (for example, to simultaneously add an echo effect and a change in pitch)?

编辑:检查iPhone SDK头之后(我想AudioUnit.h,我不是在Mac上的那一刻前),我注意到,AUPitch被注释掉。因此,它看起来并不像AUPitch可在iPhone毕竟。的

After inspecting the iPhone SDK headers (I think AudioUnit.h, I'm not in front of a Mac at the moment), I noticed that AUPitch is commented out. So it doesn't look like AUPitch is available on the iPhone after all. weep weep

苹果似乎有更好的在后期developer.apple.com组织了iPhone SDK文档 - 现在它更难找到AUPitch等引用

Apple seems to have better organized their iPhone SDK documentation at developer.apple.com of late - now its more difficult to find references to AUPitch, etc.

不过,我仍然有兴趣在质量上的答案在iPhone上使用音频单元(一般)。

That said, I'm still interested in quality answers on using Audio Units (in general) on the iPhone.

推荐答案

有一些很好的资源,这里(的 http://michael.tyson.id.au/2008/11/04/using-remoteio-audio-unit/ )使用该RemoteIO音频单元。根据我的经验用在iPhone上的音频单元工作时,我发现我可以在回调函数手动实现转换。在此过程中,你可能会发现你解决问题。

There are some very good resources here (http://michael.tyson.id.au/2008/11/04/using-remoteio-audio-unit/) for using the RemoteIO Audio Unit. In my experience working with Audio Units on the iPhone, I've found that I can implement a transformation manually in the callback function. In doing so, you might find that solves you problem.

这篇关于如何使用音频单元在iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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