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,几乎尝试了我能想到的每个选项...
事实证明,各个频段以及均衡器节点本身都存在旁路。设置filterParameters.bypass = NO可以解决此问题。