使用AVPlayer添加iPod均衡器效果 [英] Add iPod Equalizer effect using AVPlayer

查看:421
本文介绍了使用AVPlayer添加iPod均衡器效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用AVPlayer开发音乐应用程序,该应用程序处于最后阶段。一切都在进行,直到我们开始研究 iPod均衡器对当前歌曲应用效果。
当我们应用 AudioUnitProperty 时,我们可以获取内置的均衡器列表。我们在歌曲中看不到任何效果。

We are developing a music app using AVPlayer, which is at the end stage. Everything was on track until we started working on iPod Equalizer applying effects to the currents song. We are able to fetch the built in Equalizers list when we apply the AudioUnitProperty we don't see any effects in songs.

您的宝贵回应将对我们有所帮助。

Your valuable response will be helpful to us.

推荐答案

你可以使用 AUGraph 来完成各种EQ效果, iOS中的 AudioUnits

You can most certainly accomplish various EQ effects using an AUGraph and AudioUnits in iOS.

基本上,您可以在音频的源和输出之间插入效果。您可以使用多声道混音器之类的东西来控制或在 AUGraph 中使用其他更复杂的音频单元,以获得对音频的更大控制。使用AudioUnits,如果需要,您甚至可以获取缓冲区中的每个音频样本。这将要求您重新编码某些音频处理,但它肯定会允许您应用EQ效果。

Basically, you would insert the effect between the source and the output of your audio. You can use things like a multichannel mixer to have some control, or other, more complex audio units in an AUGraph to obtain much greater control over the Audio. Using AudioUnits, if you needed to, you could even get at each audio sample in the buffer. This would require you to re-code some of your audio processing, but it would certainly allow you to apply the EQ effects.

您可以使用iPod效果器,与iOS在播放音乐时应用这些效果的单位完全相同。这将为您提供最接近效果声音的匹配,因为它与 AudioUnit 完全相同。

You could use the iPod Effects Unit, which is exactly the same unit as iOS uses to apply those effects when it plays music. This will should give you the closest match for effect sounds, since it is exactly the same AudioUnit.

来自Apple:

iPod EQ Audio Unit Description (向下滚动页面)

音频单元子类型的类型定义


iPod EQ单元提供一组预定义的色调均衡曲线作为出厂预设。通过访问音频单元的kAudioUnitProperty_FactoryPresets属性获取可用EQ设置数组。然后,您可以使用它作为kAudioUnitProperty_PresentPreset属性的值来应用设置。

The iPod EQ unit provides a set of predefined tonal equalization curves as factory presets. Obtain the array of available EQ settings by accessing the audio unit’s kAudioUnitProperty_FactoryPresets property. You can then apply a setting by using it as the value for the kAudioUnitProperty_PresentPreset property.

您可以在音频源之间插入此单位(无论是文件,麦克风输入等)还是您的音频输出(扬声器,耳机等)。然后,您可以将任何iPod EQ效果应用于音频。

You would insert this unit between your audio source (be it a file, microphone input, etc.) and your audio output (speakers, headphones, etc.). You can then apply any of the iPod EQ effects to your audio.

这是指定iPod EQ单位时使用的属性:

Here's the attributes to use when specifying the iPod EQ Unit:


kAudioUnitType_Effect

kAudioUnitType_Effect

kAudioUnitSubType_AUiPodEQ

kAudioUnitSubType_AUiPodEQ

kAudioUnitManufacturer_Apple

kAudioUnitManufacturer_Apple

另外,请务必查看音频单元托管指南。此页面包含您要参考的许多其他相关文档的链接。

Also, be sure to check out the Audio Unit Hosting Guide from Apple. This page contains links to much of the other relevant documentation that you will want to reference.

这篇关于使用AVPlayer添加iPod均衡器效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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