---
title: AVSampleBufferGeneratorBatch
framework: avfoundation
role: symbol
role_heading: Class
path: avfoundation/avsamplebuffergeneratorbatch
---

# AVSampleBufferGeneratorBatch

An object that generates sample buffers in a batch.

## Declaration

```swift
class AVSampleBufferGeneratorBatch
```

## Overview

Overview The benefit of batching is it aggregates adjacent I/O requests and overlaps them when possible for all sample buffers within the batch.

## Topics

### Preparing a batch

- [makeDataReady(completionHandler:)](avfoundation/avsamplebuffergeneratorbatch/makedataready(completionhandler:).md)

### Canceling a batch

- [cancel()](avfoundation/avsamplebuffergeneratorbatch/cancel().md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Sample buffer generation

- [Playing custom audio with your own player](avfaudio/playing-custom-audio-with-your-own-player.md)
- [AVSampleBufferRequest](avfoundation/avsamplebufferrequest.md)
- [AVSampleBufferGenerator](avfoundation/avsamplebuffergenerator.md)
