<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.3.0 - 10.7.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudio",
  "identifier" : "/documentation/CoreAudio/AudioHardwareAddRunLoopSource",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Audio"
    ],
    "preciseIdentifier" : "c:@F@AudioHardwareAddRunLoopSource"
  },
  "title" : "AudioHardwareAddRunLoopSource"
}
-->

# AudioHardwareAddRunLoopSource

```
extern OSStatus AudioHardwareAddRunLoopSource(CFRunLoopSourceRef inRunLoopSource);
```

## Parameters

`inRunLoopSource`

The CFRunLoopSource to add.

## Return Value

An OSStatus indicating success or failure.

## Discussion

\abstract Add the given CFRunLoopSource to the the HAL’s notification CFRunLoop.
\discussion The CFRunLoop the HAL uses for notifications is specified by
kAudioHardwarePropertyRunLoop. If kAudioHardwarePropertyRunLoop changes,
CFRunLoopSources added with this function will automatically be transferred to
the new CFRunLoop.
Usage of the HAL’s notification run loop is deprecated. Please use libdispatch
instead.

---

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)