I'm building a virtual audio device using the HAL Plugin (AudioServerPlugin) API on macOS. The plugin loads correctly, WriteMix is called with non-zero audio data, but Plugin_StartIO is never called from my app's AUHAL input client.
Environment:
- macOS 26.5
- Xcode (latest)
- Bundle ID: com.private.SubON
- Plugin installed at: /Library/Audio/Plug-Ins/HAL/SubONHALPlugin.driver
What works:
- Plugin loads and is visible as "SubON Virtual Device"
- Plugin_AddDeviceClient is called with bundleID=com.private.SubON
- WriteMix is called with non-zero maxSrc values (audio is reaching the plugin)
- AUHAL setup completes: EnableIO input=1 output=0, CurrentDevice set correctly, AudioUnitInitialize succeeds
- pre-start readback confirms: currentDevice matches, enableIOIn=1
What doesn't work:
- Plugin_StartIO is never called from the SubON.app input client
- WillDoIOOperation is never called
- ReadInput is never called
- maxAmplitude in the input tap is always 0.0
AUHAL setup code (Swift):
AudioUnitUninitialize(auhal)
AudioUnitSetProperty(auhal, kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Input, 1, &one, size)
AudioUnitSetProperty(auhal, kAudioOutputUnitProperty_EnableIO,
kAudioUnitScope_Output, 0, &zero, size)
AudioUnitSetProperty(auhal, kAudioOutputUnitProperty_CurrentDevice,
kAudioUnitScope_Global, 0, &deviceID, size)
AudioUnitInitialize(auhal)
HAL Plugin — WillDoIOOperation:
outWillDo = true;
outWillDoInPlace = true;
Returns true for both ReadInput and WriteMix.
Observation: Even when selecting "SubON Virtual Device" as the system input device in System Settings, Plugin_StartIO is still never called.
Any ideas what could prevent Plugin_StartIO from being called despite AUHAL configuration appearing correct?