wot WHAT is what? Unexpected CoreAudio get property errors/behaviors

I see unexpected behavior when using AudioObjectGetPropertyData() to get the Channel Number Name or the Channel Category Name for the iPhone Microphone or the MacBook Pro Microphone audio devices. I am running macOS 14.4 Sonoma on a Intel MacBook Pro 15" 2019.

I have a test program that loops though all audio devices on a system, and all channels on each device. It uses AudioObjectGetPropertyData() to get the device name and manufacturer name and then iterate over the input and output channels getting Channel Number Name, Channel Name and Channel Category.

I would expect some of these values (like channel Name frequently is) to be empty CFStrings. Or for others to return FALSE to AudioObjectHasProperty() if the driver does not implement the property. And that is how things behave for most devices...

... except for the MacBook Pro Microphone and iPhone Microphone devices. There I get AudioObjectHasProperty() return TRUE but then a AudioObjectGetPropertyData() call with the exact same AudioObjectPropertyAddress returns with an error code 'WHAT'.

Took me a little while to realize the error cord being returned was 'WHAT' not 'what' and I added a modified checkError() function here to capture that and more.

So what surprised me is:

  1. If AudioObjectHasProperty() returns TRUE then I expect that the matching AudioObjectGetPropertyData() works.

and

  1. What the heck is 'WHAT'? I assume it is supposed to mean 'what' aka kAudioHardwareUnspecifiedError. Why is that actual error value not returned?

Are there other places that return 'WHAT' or capitalized versions of these standard OSStatus CoreAudio errors?

The example program is not complex but is too long for here so it's on GitHub at https://github.com/Darryl-Ramm/Wot

Here is some output from that program showing the unexpected behavior:

I see unexpected behaviro when using AudioObjectGetPropertyData() to get Channel Number Name or the Channel Category Name for my iPhone Microphone or the MacBook Pro Microphone audio devices. (I am running macOS 14.4 Sonoma on a Intel MacBook Pro 15" 2019).

I have a test program that loops though all audio devices on a system, and all channels on each device. It uses AudioObjectGetPropertyData() to get the device name and manufacturer name and then iterate over the input and output channels getting Channel Number Name, Channel Name and Channel Category.

I would expect some of these values (like channel Name frequently is) to be empty CFStrings. Or for others to return FALSE to AudioObjectHasProperty() if the property does no exist. And that is how things behave for most devices...

... except for the MacBook Pro Microphone and iPhone Microphone devices. There I get AudioObjectHasProperty() return TRUE but then a AudioObjectGetPropertyData() call with the exact same AudioObjectPropertyAddress returns with an error code 'WHAT'.

Took me a little while to realize the error cord being returned was 'WHAT' not 'what' and I added a modified checkError() function here to capture that and more.  

1. If AudioObjectHasProperty() returns TRUE then I expect that the matching AudioObjectGetPropertyData() works.

and

2. What the hecks is 'WHAT'?  I assume it is supposed to mean 'what' aka kAudioHardwareUnspecifiedError.  Why is that actual error value not returned?

Are there other places that return 'WHAT' or capitlaized versions of these standard OSstatus CoreAudio errors? 

The example program is not complex but too long for here so it's on githib at https://github.com/Darryl-Ramm/Wot

Here is some output from that program showing the unexpected behavior:

```
   ID  Device Name                         Manufacturer
 ----  ----------------------------------  --------------------------------
 0xd7  Darryl’s iPhone Microphone        Apple Inc.
 ---------------------------------- Input ---------------------------------
 Stream #  Chan  Channel NumberName  Channel Name        Channel Category
 --------  ----  ------------------  ------------------  ------------------
      HALC_ShellObject.mm:437    HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT)
Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages.
      HALC_ShellObject.mm:437    HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT)
Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages.
        0     1  GET PROPERTY ERROR                      GET PROPERTY ERROR

 **************************************************************************
   ID  Device Name                         Manufacturer
 ----  ----------------------------------  --------------------------------
 0x41  LG UltraFine Display Audio          LG Electronics Inc.
 ---------------------------------- Input ---------------------------------
 Stream #  Chan  Channel NumberName  Channel Name        Channel Category
 --------  ----  ------------------  ------------------  ------------------
        0     1    NO SUCH PROPERTY          Front Left    NO SUCH PROPERTY

 **************************************************************************
   ID  Device Name                         Manufacturer
 ----  ----------------------------------  --------------------------------
 0x3b  LG UltraFine Display Audio          LG Electronics Inc.
 ---------------------------------- Output --------------------------------
 Stream #  Chan  Channel NumberName  Channel Name        Channel Category
 --------  ----  ------------------  ------------------  ------------------
        0     1    NO SUCH PROPERTY          Front Left    NO SUCH PROPERTY
        0     2    NO SUCH PROPERTY         Front Right    NO SUCH PROPERTY

 **************************************************************************
   ID  Device Name                         Manufacturer
 ----  ----------------------------------  --------------------------------
 0x73  BlackHole 2ch                       Existential Audio Inc.
 ---------------------------------- Input ---------------------------------
 Stream #  Chan  Channel NumberName  Channel Name        Channel Category
 --------  ----  ------------------  ------------------  ------------------
        0     1    NO SUCH PROPERTY                        NO SUCH PROPERTY
        0     2    NO SUCH PROPERTY                        NO SUCH PROPERTY
 ---------------------------------- Output --------------------------------
 Stream #  Chan  Channel NumberName  Channel Name        Channel Category
 --------  ----  ------------------  ------------------  ------------------
        0     1    NO SUCH PROPERTY                        NO SUCH PROPERTY
        0     2    NO SUCH PROPERTY                        NO SUCH PROPERTY

 **************************************************************************
   ID  Device Name                         Manufacturer
 ----  ----------------------------------  --------------------------------
 0xd2  MacBook Pro Microphone              Apple Inc.
 ---------------------------------- Input ---------------------------------
 Stream #  Chan  Channel NumberName  Channel Name        Channel Category
 --------  ----  ------------------  ------------------  ------------------
      HALC_ShellObject.mm:437    HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT)
Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages.
      HALC_ShellObject.mm:437    HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT)
Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages.
        0     1  GET PROPERTY ERROR                      GET PROPERTY ERROR

 **************************************************************************
   ID  Device Name                         Manufacturer
 ----  ----------------------------------  --------------------------------
 0xcb  MacBook Pro Speakers                Apple Inc.
 ---------------------------------- Output --------------------------------
 Stream #  Chan  Channel NumberName  Channel Name        Channel Category
 --------  ----  ------------------  ------------------  ------------------
        0     1                   1                   1                   1
        0     2                   2                   2                   2




Here is another go at the program output. Sorry it's a mess here however I try to display it and it's only likely to make sense to folks looking over the code. The output looks best on the Xcode Console, if you just run the test program there.

ID Device Name Manufacturer


0xd7 Darryl’s iPhone Microphone Apple Inc. ---------------------------------- Input --------------------------------- Stream # Chan Channel NumberName Channel Name Channel Category


  HALC_ShellObject.mm:437    HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT)

Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages. HALC_ShellObject.mm:437 HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT) Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages. 0 1 GET PROPERTY ERROR GET PROPERTY ERROR


ID Device Name Manufacturer


0x41 LG UltraFine Display Audio LG Electronics Inc. ---------------------------------- Input --------------------------------- Stream # Chan Channel NumberName Channel Name Channel Category


    0     1    NO SUCH PROPERTY          Front Left    NO SUCH PROPERTY

ID Device Name Manufacturer


0x3b LG UltraFine Display Audio LG Electronics Inc. ---------------------------------- Output -------------------------------- Stream # Chan Channel NumberName Channel Name Channel Category


    0     1    NO SUCH PROPERTY          Front Left    NO SUCH PROPERTY
    0     2    NO SUCH PROPERTY         Front Right    NO SUCH PROPERTY

ID Device Name Manufacturer


0x73 BlackHole 2ch Existential Audio Inc. ---------------------------------- Input --------------------------------- Stream # Chan Channel NumberName Channel Name Channel Category


    0     1    NO SUCH PROPERTY                        NO SUCH PROPERTY
    0     2    NO SUCH PROPERTY                        NO SUCH PROPERTY

---------------------------------- Output -------------------------------- Stream # Chan Channel NumberName Channel Name Channel Category


    0     1    NO SUCH PROPERTY                        NO SUCH PROPERTY
    0     2    NO SUCH PROPERTY                        NO SUCH PROPERTY

ID Device Name Manufacturer


0xd2 MacBook Pro Microphone Apple Inc. ---------------------------------- Input --------------------------------- Stream # Chan Channel NumberName Channel Name Channel Category


  HALC_ShellObject.mm:437    HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT)

Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages. HALC_ShellObject.mm:437 HALC_ShellObject::GetPropertyData: call to the proxy failed, Error: 1464353108 (WHAT) Error: getCFString(): AudioObjectGetPropertyData() ('WHAT'): The function call failed while doing something that doesn't provide any error messages. 0 1 GET PROPERTY ERROR GET PROPERTY ERROR


ID Device Name Manufacturer


0xcb MacBook Pro Speakers Apple Inc. ---------------------------------- Output -------------------------------- Stream # Chan Channel NumberName Channel Name Channel Category


    0     1                   1                   1                   1
    0     2                   2                   2                   2

I can reproduce your results on macOS 14.3.1 (on Apple Silicon). I don't know what 'WHAT' means either, can't find it in any headers.

If I were you, I'd just file a bug and move on. Any error fetching a channel name means it doesn't have a name.

Thanks checking. Yes I'll report this.

wot WHAT is what? Unexpected CoreAudio get property errors/behaviors
 
 
Q