如何实现Equilizer的音频播放器设置为iPhone [英] How to achieve Equilizer Setting for iPhone in Audio Player

查看:133
本文介绍了如何实现Equilizer的音频播放器设置为iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置低音,均衡器或其他类型的编程方式为我的iPhone应用程序?
有没有现成的模式或方法可用?请请提供一个参考。

How can i set the bass, or other kind of Equalizer programatically for my iphone app? Are there ready frameworks or methods available?? Kindly please provide a reference..

推荐答案

如果你建立你的音频播放作为AudioUnit图,你应该能够使用内置iPod EQ AudioUnit,用$ P $的pset像那些在iPod的应用程序。看一看<一个href=\"http://developer.apple.com/library/ios/#sample$c$c/iPhoneMixerEQGraphTest/Introduction/Intro.html\"相对=nofollow>这个例子希望这将帮助您了解如何做到这一点。

If you build your audio playback as an AudioUnit graph, you should be able to use the built-in iPod EQ AudioUnit, with presets like those in the iPod application. Have a look at this example which will hopefully help you understand how to do this.

当你正在阅读的code,一定要明白,音频单位是一个图,其中音频信号通过回调方式流经图节点,而在它的每个节点都可以修改信号对输出节点的方式(主要是扬声器。)所以你要做的就是您将文件加载到内存中,然后你的PCM(声音样本)的数据馈送到音频单元在您指定的回调。当缓冲区为空,则回调将被调用,您可以填满它。

As you're reading the code, make sure you understand that Audio Units are nodes in a graph, where the audio signal flows through the graph by means of callbacks, and that each node can modify the signal on it's way towards the output node (essentially the speaker.) So what you do is you load your file into memory, and you then feed the PCM (sound sample) data to the audio unit in a callback that you have specified. When the buffer is empty, the callback will be invoked and you can fill it up.

链接的示例设置了一个混频器节点,输出节点和均衡器节点连接在一起他们,并开始播放一些声音文件加载有他们到内存后。

The linked example sets up a mixer node, an output node and the equalizer node, connects them together, and starts playing a number of sound files after having loaded them into memory.

如果你想让它做什么iPod的EQ AU不这样做,你可以建立自己的AudioUnit后来取代它,但是这需要一些知识DSP。您还可以找出一些有开源的均衡器已经实现为音频单元(这是Mac平台的音乐制作工具,例如用于对通用格式。)

If the iPod EQ AU doesn't do what you want it to do, you can build your own AudioUnit and replace it later, but that requires some DSP knowledge. You may also be able to find some open-source equalizers out there that have been implemented as Audio Units (which is a common format on the Mac platform for effects used in music production tools for example.)

这篇关于如何实现Equilizer的音频播放器设置为iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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