<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudio",
  "identifier" : "/documentation/CoreAudio/AudioHardwareBox",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Audio"
    ],
    "preciseIdentifier" : "s:9CoreAudio0B11HardwareBoxC"
  },
  "title" : "AudioHardwareBox"
}
-->

# AudioHardwareBox

Instances of the AudioHardwareBox class encapsulate a single audio box, which is a container
for other objects (typically device objects). A box publishes identifying information about itself
and can be enabled or disabled. A box’s contents are only available to the system when the box
is enabled.

```
class AudioHardwareBox
```

## Topics

### Initializers

[`init(id: AudioObjectID)`](/documentation/CoreAudio/AudioHardwareBox/init(id:))

### Instance Properties

[`var clocks: [AudioHardwareClock]`](/documentation/CoreAudio/AudioHardwareBox/clocks)

An array of AudioHardwareClocks that represent all the clock objects that came out of the
given box. Note that until a box is enabled, this list will be empty.

[`var devices: [AudioHardwareDevice]`](/documentation/CoreAudio/AudioHardwareBox/devices)

An array of AudioHardwareDevices that represent all the device objects that came out of
the given box. Note that until a box is enabled, this list will be empty.

[`var enabled: Bool`](/documentation/CoreAudio/AudioHardwareBox/enabled)

A Bool where a value of true indicates that the box’s contents are available to the system.

[`var hasAudio: Bool`](/documentation/CoreAudio/AudioHardwareBox/hasAudio)

A Bool where a value of true indicates that the box supports audio.

[`var hasMIDI: Bool`](/documentation/CoreAudio/AudioHardwareBox/hasMIDI)

A Bool where a value of true indicates that the box supports MIDI.

[`var hasVideo: Bool`](/documentation/CoreAudio/AudioHardwareBox/hasVideo)

A Bool where a value of true indicates that the box supports video.

[`var isProtected: Bool`](/documentation/CoreAudio/AudioHardwareBox/isProtected)

A Bool where a value of true indicates that the box requires authentication to use.

[`var transportType: UInt32`](/documentation/CoreAudio/AudioHardwareBox/transportType)

A UInt32 whose value indicates how the box is connected to the system. Constants for some
of the values for this property can be found in the enum in the AudioDevice Constants
section of AudioHardwareBase.h

[`var uid: String`](/documentation/CoreAudio/AudioHardwareBox/uid)

A String that contains a persistent identifier for the box object. A box’s UID is
persistent across boots. The content of the UID string is a black box and may contain
information that is unique to a particular instance of an box’s hardware or unique
to the CPU. Therefore they are not suitable for passing between CPUs or for identifying
similar models of hardware.

### Instance Methods

[`func disable() throws`](/documentation/CoreAudio/AudioHardwareBox/disable())

Make the box’s contents unavailable to the system.

[`func enable() throws`](/documentation/CoreAudio/AudioHardwareBox/enable())

Make the box’s contents available to the system.

## Relationships

### Inherits From

[`AudioHardwareObject`](/documentation/CoreAudio/AudioHardwareObject)

### Conforms To

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

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

---

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)