<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudioTypes",
  "identifier" : "/documentation/CoreAudioTypes/AVAudioSession/ErrorCode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Audio Types",
      "CoreAudioTypes"
    ],
    "preciseIdentifier" : "c:@E@AVAudioSessionErrorCode"
  },
  "title" : "AVAudioSession.ErrorCode"
}
-->

# AVAudioSession.ErrorCode

Codes that describe error conditions that may occur when performing audio session operations.

```
enum ErrorCode
```

## Topics

### Error codes

[`AVAudioSessionErrorCodeNone`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/none)

An error code that indicates the operation succeeded.

[`AVAudioSessionErrorCodeBadParam`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/badParam)

An error code that indicates an attempt to set a property to an illegal value.

[`AVAudioSessionErrorCodeCannotInterruptOthers`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/cannotInterruptOthers)

An error code that indictates an attempt to make a nonmixable audio session active while the app was in the background.

[`AVAudioSessionErrorCodeCannotStartPlaying`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/cannotStartPlaying)

An error code that indicates an attempt to start audio playback when it wasn’t allowed.

[`AVAudioSessionErrorCodeCannotStartRecording`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/cannotStartRecording)

An error code that indicates an attempt to start audio recording, but the operation failed.

[`AVAudioSessionErrorCodeExpiredSession`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/expiredSession)

An error code that indicates that an operation failed because the system deallocated the associated session.

[`AVAudioSessionErrorCodeIncompatibleCategory`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/incompatibleCategory)

An error code that indicates an attempt to perform an operation that the current audio session category doesn’t support.

[`AVAudioSessionErrorCodeIsBusy`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/isBusy)

An error code that indicates an attempt to deactivate the audio session while it’s still playing or recording.

[`AVAudioSessionErrorCodeMediaServicesFailed`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/mediaServicesFailed)

An error code that indictates an attempt to use the audio session during or after a Media Services failure.

[`AVAudioSessionErrorCodeMissingEntitlement`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/missingEntitlement)

An error code that indicates an attempt to perform an operation for which the app doesn’t have the required entitlements.

[`AVAudioSessionErrorCodeResourceNotAvailable`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/resourceNotAvailable)

An error code that indicates that an operation failed because the device doesn’t have sufficient hardware resources to complete the action.

[`AVAudioSessionErrorCodeSessionNotActive`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/sessionNotActive)

An error code that indicates the operation failed because the session isn’t active.

[`AVAudioSessionErrorCodeSiriIsRecording`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/siriIsRecording)

An error code that indicates an attempt to perform an operation that isn’t allowed while Siri is recording.

[`AVAudioSessionErrorCodeUnspecified`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/unspecified)

An error code that indicates an unspecified error occurred.

[`AVAudioSessionErrorCodeInsufficientPriority`](/documentation/CoreAudioTypes/AVAudioSession/ErrorCode/insufficientPriority)

An error code that indicates the app isn’t allowed to set the audio category because it’s in use by another app.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)