Karen  Karapetyan
Karen Karapetyan

Reputation: 754

AVAudioEngine apply audio effects

I am trying to make audio processing application. Is there a way to apply audio effects to audio file using AVAudioEngine?

Upvotes: 2

Views: 538

Answers (1)

Chris
Chris

Reputation: 2907

Yes, you sure can, You can use:

  • AVAudioPlayerNode
  • AVAudioUnitDistortion (or any other effect unit)
  • engine.outputNode (speaker)

The general connection of the graph looks like:

func connectNodes()
{
    engine.connect(unitfilePlayer, to:unitdistortionUnit, format:unitfilePlayerformat)
    engine.connect(unitdistortionUnit, to:unitspeaker, format:engine.mainMixerNode.outputFormat(forBus: 0))
}

So the graph looks like:

Graph Example

Upvotes: 1

Related Questions