<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudio",
  "identifier" : "/documentation/CoreAudio/AudioServerPlugInRegisterMediaDeviceExtension",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Audio"
    ],
    "preciseIdentifier" : "c:@F@AudioServerPlugInRegisterMediaDeviceExtension"
  },
  "title" : "AudioServerPlugInRegisterMediaDeviceExtension"
}
-->

# AudioServerPlugInRegisterMediaDeviceExtension

```
extern OSStatus AudioServerPlugInRegisterMediaDeviceExtension(AudioServerPlugInDriverRef inPlugIn, void (^interruptionHandler)());
```

## Parameters

`inPlugIn`

The plug-in interface that will be called by the system.

`interruptionHandler`

The handler that will be called when the connection to the audio server
is interrupted

## Return Value

An OSStatus indicating success or failure.

## Discussion

\abstract This is used to register an AudioServerPlugin interface to host a driver
for a remote media device to be used in conjunction with
<doc://com.apple.documentation/documentation/MediaDevice/creating-a-media-device-extension>.
\discussion AudioServerPlugIns that are registered this way are restricted to presenting
a single output audio device, which must have a transport type of
``doc://com.apple.coreaudio/documentation/CoreAudio/kAudioDeviceTransportTypeRemoteScreen`` or
``doc://com.apple.coreaudio/documentation/CoreAudio/kAudioDeviceTransportTypeRemoteStreaming``. If these conditions are not met,
the registration will fail with a result of ``doc://com.apple.coreaudio/documentation/CoreAudio/kAudioHardwareIllegalOperationError``.
It is also expected that the device UID (``doc://com.apple.coreaudio/documentation/CoreAudio/kAudioDevicePropertyDeviceUID``)
matches the <doc://com.apple.documentation/documentation/MediaDevice/MediaOutputDevice>’s <doc://com.apple.documentation/documentation/MediaDevice/MediaOutputDevice/id>.

---

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)