---
title: makeBatch()
framework: avfoundation
role: symbol
role_heading: Instance Method
path: avfoundation/avsamplebuffergenerator/makebatch()
---

# makeBatch()

Creates a batch object to handle generating multiple sample buffers.

## Declaration

```swift
func makeBatch() -> AVSampleBufferGeneratorBatch
```

## Return Value

Return Value An object to batch generate sample buffers.

## Discussion

Discussion Generating sample buffers in batches optimizes performance by allowing the system to asynchronously load sample data and optimize I/O when possible.

## See Also

### Creating a sample buffer

- [makeSampleBuffer(for:)](avfoundation/avsamplebuffergenerator/makesamplebuffer(for:).md)
- [makeSampleBuffer(for:addTo:)](avfoundation/avsamplebuffergenerator/makesamplebuffer(for:addto:).md)
- [createSampleBuffer(for:)](avfoundation/avsamplebuffergenerator/createsamplebuffer(for:).md)
