简体   繁体   English

如何以编程方式在iOS设备中播放音高变化的声音文件

[英]How can I play a sound file with varying pitch in iOS device programmatically

I have a heart beat sound file. 我有一个心跳声音文件。 I would like to play it on increasing pitch as a user waits for a time interval to finish. 我想在用户等待时间间隔结束时以越来越高的音调播放它。 Can anyone tell me how to do this in iOS ? 谁能告诉我如何在iOS中执行此操作?

You may want to see: Real-time Pitch Shifting on the iPhone 您可能需要看一下:iPhone上的实时音高转换

That article references dirac3d, but CoreAudio also now has this capability but it's non-trivial to setup. 该文章引用了dirac3d,但CoreAudio现在也具有此功能,但设置起来并不容易。 Chris Adamson has written some good articles on CoreAudio that would probably be helpful. 克里斯·亚当森(Chris Adamson)在CoreAudio上写了一些不错的文章,可能会有所帮助。

当前版本的iOS包括内置的NewTimePitch音频单元,可用于独立增加音调或播放时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM