karaggeorge / macos-audio-devices

Get, set and configure the Audio Devices on macOS
MIT License
170 stars 17 forks source link

feat: add isHidden property and allow to set isHidden device property #26

Open lbdremy opened 1 year ago

lbdremy commented 1 year ago

Hi,

The changes introduced allow to see if a device is hidden from the main list of audio devices, as well as hidding a specific device in theory. I'm having trouble to make it work properly, I'm getting this error:

❯ ./audio-devices setIsHiddenDeviceProperty 106 true
device id found while setIsHiddenCommand 106
Error: The operation couldn’t be completed. (OSStatus error 1852797029.)

The OSStatus error leads to this error kAudioHardwareIllegalOperationError (https://www.osstatus.com/search/results?platform=all&framework=all&search=1852797029).

image

I'm sure I'm doing something wrong here, but I cannot figure out what is it. Do you have an idea ? Thanks for your help