I’m having trouble grasping the proper way to convert Objective-C code to an ASOBJC equivalent. Is this possible? Looking at some source code, I see this:
Boolean GetDefaultInputAudioDevice(AudioDeviceID *defaultInputDeviceID)
{
UInt32 thePropSize = sizeof(AudioDeviceID);
AudioObjectPropertyAddress thePropertyAddress =
{ kAudioHardwarePropertyDefaultInputDevice,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster };
OSStatus errorCode =
AudioObjectGetPropertyData(kAudioObjectSystemObject,
&thePropertyAddress,
0,
NULL,
&thePropSize,
defaultInputDeviceID);
if (errorCode) {
printf("Error in GetDefaultInputAudioDevice: %d\n", errorCode);
}
return errorCode == 0;
}
What would this look like? My searching is failing me today and I guess I don’t grasp Objective - C enough yet to know if this is replicable?