---
title: "captureOutput(_:didOutput:from:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcaptureaudiodataoutputsamplebufferdelegate/captureoutput(_:didoutput:from:)"
---

# captureOutput(_:didOutput:from:)

Notifies the delegate that a sample buffer was written.

## Declaration

```swift
optional func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection)
```

## Parameters

- `output`: The capture output object.
- `sampleBuffer`: The sample buffer that was output.
- `connection`: The connection.
