macos – How to share data between application written in swift And Hal driver

You can use XPC to communicate with your Audio Server Plugin. See QA1811 for more info and code samples.

However that document doesn’t mention that you can also define your own AudioObjectPropertySelectors and send a few CoreFoundation objects back and forth between your ASP and any app that can call CoreAudio.

There’s more information on custom properties in AudioServerPlugInCustomPropertyInfo in AudioServerPlugIn.h.

The objects you can send and receive from your ASP are:

  1. kAudioServerPlugInCustomPropertyDataTypeNone (nothing !)
  2. kAudioServerPlugInCustomPropertyDataTypeCFString (a string)
  3. kAudioServerPlugInCustomPropertyDataTypeCFPropertyList (what ever you can serialise into a property list)

Read more here: Source link