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

# AudioDeviceCreateIOProcIDWithBlock(_:_:_:_:)

```
func AudioDeviceCreateIOProcIDWithBlock(_ outIOProcID: UnsafeMutablePointer<AudioDeviceIOProcID?>, _ inDevice: AudioObjectID, _ inDispatchQueue: dispatch_queue_t?, _ inIOBlock: @escaping AudioDeviceIOBlock) -> OSStatus
```

## Parameters

`outIOProcID`

The newly created AudioDeviceIOProcID.

`inDevice`

The AudioDevice to register the Block with.

`inDispatchQueue`

The dispatch queue on which the IOBlock will be dispatched. All
IOBlocks are dispatched synchronously. Note that this dispatch queue will be
retained until a matching call to AudioDeviceDestroyIOProcID is made. If
this value is NULL, then the IOBlock will be directly invoked.

`inIOBlock`

The AudioDeviceIOBlock to register.  Note that this block will be
Block_copy’d and the reference maintained until a matching call to
AudioDeviceDestroyIOProcID is made.

## Return Value

An OSStatus indicating success or failure.

## Discussion

\abstract Creates an AudioDeviceIOProcID from an AudioDeviceIOBlock

---

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)