---
title: "copyAudio(atStart:count:)"
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [provideo encoder extensions 1.0+]
path: "professional_video_applications/compressormediadecoder/copyaudio(atstart:count:)"
---

# copyAudio(atStart:count:)

Returns decoded audio samples starting from the specified temporal position.

## Declaration

```swift
func copyAudio(atStart start: Int64, count: UnsafeMutablePointer<Int64>!) -> Data!
```

## Parameters

- `start`: The temporal position of the audio sample.
- `count`: On input, the number of audio samples to return; on output, the actual number of samples returned.

## Return Value

Return Value A data buffer with decoded audio samples at the sample rate and channel layout specified in the encoder settings.

## Discussion

Discussion If the decoder does not have enough samples to return as specified in the count parameter, it updates the count parameter with the actual number of samples in the returned audio data buffer. note: It’s recommended that you call the decoder for audio samples of 1 second per call, in temporal order.

## See Also

### Getting Decoded Frames and Samples

- [copyCloseCaptionData(_:frameCount:)](professional_video_applications/compressormediadecoder/copyclosecaptiondata(_:framecount:).md)
- [copyFrame(_:)](professional_video_applications/compressormediadecoder/copyframe(_:).md)
- [releaseFrame(_:)](professional_video_applications/compressormediadecoder/releaseframe(_:).md)
- [CompressorMediaDecoderPtr](professional_video_applications/compressormediadecoderptr.md)
