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

# AudioHardwareSystem

The audio objects in the HAL are arranged in a containment hierarchy. The root of the hierarchy
is the one and only instance of the system class. The properties of the AudioHardwareSystem
describe the process global settings such as the various default devices. The system object
also contains all the devices that are available.

```
class AudioHardwareSystem
```

## Topics

### Initializers

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

### Instance Properties

[`var allowsHogMode: Bool`](/documentation/CoreAudio/AudioHardwareSystem/allowsHogMode)

A Bool where true indicates that this process wants the HAL to automatically take hog mode
and false indicates that the HAL should not automatically take hog mode on behalf of the
process.

[`var allowsSleeping: Bool`](/documentation/CoreAudio/AudioHardwareSystem/allowsSleeping)

A Bool where true indicates that the process will allow the CPU to idle sleep even if
there is audio IO in progress. Fasle indicates that the CPU will not be allowed to idle
sleep.

[`var allowsUnloading: Bool`](/documentation/CoreAudio/AudioHardwareSystem/allowsUnloading)

A Bool where true indicates that this process wants the HAL to unload itself after a period
of inactivity where there are no IOProcs and no listeners registered with any object.

[`var boxes: [AudioHardwareBox]`](/documentation/CoreAudio/AudioHardwareSystem/boxes)

An array of AudioHardwareBoxes that represent all the box objects on the system.

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

An array of AudioHardwareClocks that represent all the clock objects on the system.

[`var defaultInputDevice: AudioHardwareDevice?`](/documentation/CoreAudio/AudioHardwareSystem/defaultInputDevice)

The default input audio device on the system, or nil if there is no default input device.

[`var defaultOutputDevice: AudioHardwareDevice?`](/documentation/CoreAudio/AudioHardwareSystem/defaultOutputDevice)

The default output audio device on the system, or nil if there is no default output device.

[`var defaultSoundEffectsDevice: AudioHardwareDevice?`](/documentation/CoreAudio/AudioHardwareSystem/defaultSoundEffectsDevice)

The default sounds effects audio device on the system, or nil if there is no default
sound effects device.

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

An array of the AudioHardwareDevices that represent all the devices currently available
to the system.

[`var isInitializingOrExiting: Bool`](/documentation/CoreAudio/AudioHardwareSystem/isInitializingOrExiting)

A Bool where true indicates the HAL is either in the midst of initializing or in the midst
of exiting the process.

[`var isProcessInputMuted: Bool`](/documentation/CoreAudio/AudioHardwareSystem/isProcessInputMuted)

A Bool where true indicates that all data coming into the process for all devices will
be silent. A value of false indicates that input data will be received normally.

[`var plugins: [AudioHardwarePlugin]`](/documentation/CoreAudio/AudioHardwareSystem/plugins)

An array of AudioHardwarePlugins that represent all the plugin objects on the system.

[`var powerHint: AudioHardwarePowerHint`](/documentation/CoreAudio/AudioHardwareSystem/powerHint)

An AudioHardwarePowerHint enum which allows a process to indicate how aggressive the system
can be with optimizations that save power. The default value is none.

[`var processes: [AudioHardwareProcess]`](/documentation/CoreAudio/AudioHardwareSystem/processes)

An array of AudioHardwareProcesses that represent the Process objects for all client
processes currently connected to the system.

[`var shouldMixStereoToMono: Bool`](/documentation/CoreAudio/AudioHardwareSystem/shouldMixStereoToMono)

A Bool where a value of true indicates that devices should mix stereo signals down
to mono.

[`var taps: [AudioHardwareTap]`](/documentation/CoreAudio/AudioHardwareSystem/taps)

An array of AudioHardwareTaps that represent all the tap objects on the system.

### Instance Methods

[`func box(forUID: String) throws -> AudioHardwareBox?`](/documentation/CoreAudio/AudioHardwareSystem/box(forUID:))

[`func clock(forUID: String) throws -> AudioHardwareClock?`](/documentation/CoreAudio/AudioHardwareSystem/clock(forUID:))

[`func destroyAggregateDevice(AudioHardwareAggregateDevice) throws`](/documentation/CoreAudio/AudioHardwareSystem/destroyAggregateDevice(_:))

Destroys the aggregate device represented by the given AudioHardwareAggregateDevice.

[`func destroyProcessTap(AudioHardwareTap) throws`](/documentation/CoreAudio/AudioHardwareSystem/destroyProcessTap(_:))

Destroys the given tap.

[`func device(forUID: String) throws -> AudioHardwareDevice?`](/documentation/CoreAudio/AudioHardwareSystem/device(forUID:))

[`func makeAggregateDevice(description: [String : Any]) throws -> AudioHardwareAggregateDevice?`](/documentation/CoreAudio/AudioHardwareSystem/makeAggregateDevice(description:))

Creates a new aggregate device  using the provided description.

[`func makeProcessTap(description: CATapDescription) throws -> AudioHardwareTap?`](/documentation/CoreAudio/AudioHardwareSystem/makeProcessTap(description:))

Creates a new tap using the provided description.

[`func plugin(forBundleID: String) throws -> AudioHardwarePlugin?`](/documentation/CoreAudio/AudioHardwareSystem/plugin(forBundleID:))

[`func process(for: pid_t) throws -> AudioHardwareProcess?`](/documentation/CoreAudio/AudioHardwareSystem/process(for:))

[`func setAllowsHogMode(Bool) throws`](/documentation/CoreAudio/AudioHardwareSystem/setAllowsHogMode(_:))

Set the allowsHogMode property.

[`func setAllowsSleeping(Bool) throws`](/documentation/CoreAudio/AudioHardwareSystem/setAllowsSleeping(_:))

Set the allowsSleeping property.

[`func setAllowsUnloading(Bool) throws`](/documentation/CoreAudio/AudioHardwareSystem/setAllowsUnloading(_:))

Set the allowsUnloading property.

[`func setDefaultInputDevice(AudioHardwareDevice) throws`](/documentation/CoreAudio/AudioHardwareSystem/setDefaultInputDevice(_:))

Set the defaultInputDevice property.

[`func setDefaultOutputDevice(AudioHardwareDevice) throws`](/documentation/CoreAudio/AudioHardwareSystem/setDefaultOutputDevice(_:))

Set the defaultOutputDevice property.

[`func setDefaultSoundEffectsDevice(AudioHardwareDevice) throws`](/documentation/CoreAudio/AudioHardwareSystem/setDefaultSoundEffectsDevice(_:))

Set the defaultSoundEffectsDevice property.

[`func setIsProcessInputMuted(Bool) throws`](/documentation/CoreAudio/AudioHardwareSystem/setIsProcessInputMuted(_:))

Set the isProcessInputMuted property.

[`func setPowerHint(AudioHardwarePowerHint) throws`](/documentation/CoreAudio/AudioHardwareSystem/setPowerHint(_:))

Set the powerHint property.

[`func setShouldMixStereoToMono(Bool) throws`](/documentation/CoreAudio/AudioHardwareSystem/setShouldMixStereoToMono(_:))

Set the shouldMixStereoToMono property.

[`func tap(forUID: String) throws -> AudioHardwareTap?`](/documentation/CoreAudio/AudioHardwareSystem/tap(forUID:))

[`func unload() throws`](/documentation/CoreAudio/AudioHardwareSystem/unload())

Terminates all IO on all devices within the process and releases all resources capable of
being released. This essentially returns the HAL to its uninitialized state.

### Type Properties

[`static let shared: AudioHardwareSystem`](/documentation/CoreAudio/AudioHardwareSystem/shared)

The shared instance of the AudioHardwareSystem class.

## Relationships

### Inherits From

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

### Conforms To

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

[`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)