4

I'm using Apple's AudioEngine and I'm able to play sound by using AvAudioPlayerNode.The problem is when i try to add any feature such as low pass filter or even time delay, it is not affecting my player. How do I make these effects affect with AvAudioPlayerNode.

I've created different Units and attached them to the engine and then to the main mixer but still no success. I've also kept bypass false and still no solution.

eqNode = AVAudioUnitEQ(numberOfBands: 1)
eqNode!.bands.first!.filterType = AVAudioUnitEQFilterType.lowPass
eqNode!.bands.first!.frequency = firstSlider.value
eqNode!.bands.first!.bandwidth = secondSlider.value
eqNode!.bands.first!.bypass = false
eqNode!.globalGain = 0
eqNode!.bypass = false

engine.attach(player!)
engine.attach(eqNode!)
engine.connect(player!, to: eqNode!)
engine.connect(eqNode!, to: engine.mainMixerNode)

I've also tried this but no fix.

engine.connect(eqNode!, to: engine.mainMixerNode)
engine.connect(player!, to: engine.mainMixerNode)

I want the effects to manipulate the players sound.

Abraham
  • 41
  • 5

0 Answers0