AVAudioEngine

extension AVAudioEngine
  • Adding connection between nodes with default format

    Declaration

    Swift

    open func connect(_ node1: AVAudioNode, to node2: AVAudioNode)
  • Render output to an AVAudioFile for a duration. - Parameters - audioFile: An file initialized for writing - duration: Duration to render, in seconds - prerender: A closure called before rendering starts, use this to start players, set initial parameters, etc… - progress: A closure called while rendering, use this to fetch render progress

    Declaration

    Swift

    @available(iOS 11.0, OSX 10.13, tvOS 11.0, *)
    public func renderToFile(_ audioFile: AVAudioFile,
                             maximumFrameCount: AVAudioFrameCount = 4_096,
                             duration: Double,
                             prerender: (() -> Void)? = nil,
                             progress: ((Double) -> Void)? = nil) throws