A capture output that records audio and provides access to audio sample buffers as they are recorded.


class AVCaptureAudioDataOutput : AVCaptureOutput


Creating an Audio Capture Output

Configuring Audio Capture

var audioSettings: [String : Any]!

The settings used to decode or re-encode audio before it is output.

func recommendedAudioSettingsForAssetWriter(writingTo: AVFileType) -> [AnyHashable : Any]?

Specifies the recommended settings for use with an AVAssetWriterInput.

Receiving Captured Audio Data

func setSampleBufferDelegate(AVCaptureAudioDataOutputSampleBufferDelegate?, queue: DispatchQueue?)

Sets the delegate that will accept captured buffers and the dispatch queue on which the delegate will be called.

var sampleBufferCallbackQueue: DispatchQueue?

The queue on which delegate callbacks are invoked

protocol AVCaptureAudioDataOutputSampleBufferDelegate

Methods for receiving audio sample data from an audio capture.


Inherits From

Conforms To

See Also

Audio Capture

class AVCaptureAudioFileOutput

A capture output that records audio and saves the recorded audio to a file.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software