---
title: AVAudioSession.IOType
framework: avfaudio
role: symbol
role_heading: Enumeration
path: avfaudio/avaudiosession/iotype
---

# AVAudioSession.IOType

Constant values used to specify the audio session’s aggregated I/O behavior.

## Declaration

```swift
enum IOType
```

## Overview

Overview Starting in iOS 10, apps that use AVCaptureSession on iPad and iPhone devices, and support taking Live Photos, have nonaggregated audio I/O unless the app opts out by setting its I/O type to AVAudioSession.IOType.aggregated. With nonaggregated audio I/O, the system uses separate threads to service audio I/O for input and output directions. In cases with nonaggregated I/O, the sample rate and I/O buffer duration properties map to the output audio device. In this scenario, the input and output audio hardware may be running at different sample rates and with different I/O buffer durations. If any of the following are true about your app, set the I/O type to AVAudioSession.IOType.aggregated: It requires that input and output audio be presented in the same real-time I/O callback. It requires that input and output audio have the same sample rate or I/O buffer duration. It requires the ability to set a preferred sample rate or I/O buffer duration for audio input. Apps that don’t use AVCaptureSession, but do use the playAndRecord category, continue to have aggregated audio I/O, as in previous versions of iOS.

## Topics

### I/O Types

- [AVAudioSession.IOType.notSpecified](avfaudio/avaudiosession/iotype/notspecified.md)
- [AVAudioSession.IOType.aggregated](avfaudio/avaudiosession/iotype/aggregated.md)

### Initializers

- [init(rawValue:)](avfaudio/avaudiosession/iotype/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Setting the aggregated I/O preference

- [setAggregatedIOPreference(_:)](avfaudio/avaudiosession/setaggregatediopreference(_:).md)
