AKAudioUnitManager

open class AKAudioUnitManager : NSObject

Audio Unit Manager

  • The notifications this class may generate

    See more

    Declaration

    Swift

    public enum Notification
  • Callback definitions

    Declaration

    Swift

    public typealias AKComponentListCallback = ([AVAudioUnitComponent]) -> Void
  • Declaration

    Swift

    public typealias AKEffectCallback = (AVAudioUnit?) -> Void
  • Declaration

    Swift

    public typealias AKInstrumentCallback = (AVAudioUnitMIDIInstrument?) -> Void
  • Delegate that will be sent notifications

    Declaration

    Swift

    public weak var delegate: AKAudioUnitManagerDelegate?
  • first node in chain, generally a player or instrument

    Declaration

    Swift

    public var input: AKNode?
  • last node in chain, generally a mixer or some kind of output

    Declaration

    Swift

    public var output: AKNode?
  • Effects Chain

    Declaration

    Swift

    public var effectsChain: [AVAudioUnit?] { get set }
  • How many effects are active

    Declaration

    Swift

    public var effectsCount: Int { get }
  • availableEffects is accessed from multiple thread contexts. Use a dispatch queue for synchronization.

    Declaration

    Swift

    public var availableEffects: [AVAudioUnitComponent] { get set }
  • availableInstruments is accessed from multiple thread contexts. Use a dispatch queue for synchronization.

    Declaration

    Swift

    public var availableInstruments: [AVAudioUnitComponent] { get set }
  • Initialize the manager with arbritary amount of inserts

    Declaration

    Swift

    public convenience init(inserts: Int)
  • Initialize the manager

    Declaration

    Swift

    public override init()
  • Declaration

    Swift

    public func removeEffect(at index: Int, reconnectChain: Bool = true)
  • Create the Audio Unit at the specified index of the chain

    Declaration

    Swift

    public func insertAudioUnit(name: String, at index: Int)
  • Removes all effects from the effectsChain

    Declaration

    Swift

    public func removeEffects()
  • called from client to hook the chain together firstNode would be something like a player, and last something like a mixer that’s headed to the output.

    Declaration

    Swift

    open func connectEffects(firstNode: AKNode? = nil, lastNode: AKNode? = nil)
  • Clear all linked units previous processing state. IE, Panic button.

    Declaration

    Swift

    public func reset()
  • Declaration

    Swift

    public func dispose()