当前位置:  开发笔记 > IOS > 正文

Does AVAudioUnitEQ actually work on iOS?

如何解决《DoesAVAudioUnitEQactuallyworkoniOS?》经验,为你挑选了1个好方法。

No matter what I do, I can't get the AVAudioUnitEQ to actually do anything. If I set the globalGain for the AVAudioUnitEQ, it's definitely effecting the signal, but no matter what kind of EQ filterType I set or parameters, I'm not hearing any change to my sound, it's acting like a straight pass-through.

I've tried low pass, high pass, low shelf, high shelf, setting the gain, the bandwidth, everything I can think of, but nothing seems to make a difference.

Is AVAudioUnitEQ actually functional on iOS 8.4 and 9.1? I'm seeing exactly the same results on iPads with both versions of iOS.

Here's my basic engine setup, trying to get a low pass filter cutting off at 1000 hz.

engine = [[AVAudioEngine alloc] init];

equalizer = [[AVAudioUnitEQ alloc] initWithNumberOfBands:1];

AVAudioUnitEQFilterParameters *filterParameters = equalizer.bands[0];

filterParameters.filterType = AVAudioUnitEQFilterTypeLowPass;

filterParameters.frequency = 1000.0f;

equalizer.bypass = NO;  

[engine attachNode:equalizer];

mixer = [[AVAudioEnvironmentNode alloc] init];

[engine attachNode:mixer];

AVAudioEnvironmentReverbParameters *reverbParameters = mixer.reverbParameters;

reverbParameters.enable = YES;

[reverbParameters loadFactoryReverbPreset:kDefaultReverbType ]; 

[engine connect:mixer to:equalizer format:nil];

[engine connect:equalizer to:[engine mainMixerNode] format:nil];

然后,稍后,我将各种文件源连接到调音台并启动引擎。一切正常,但是无论我如何配置均衡器频段,我都从未听到过发生任何EQ,几乎尝试了我能想到的每个选项...



1> Michael Eski..:

事实证明,各个频段以及均衡器节点本身都存在旁路。设置filterParameters.bypass = NO可以解决此问题。

推荐阅读
虎仔球妈_459
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有