MCPcopy Create free account
hub / github.com/briankendall/proxy-audio-device / GetPropertyData

Method GetPropertyData

proxyAudioDevice/ProxyAudioDevice.cpp:952–1056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

950}
951
952OSStatus ProxyAudioDevice::GetPropertyData(AudioServerPlugInDriverRef inDriver,
953 AudioObjectID inObjectID,
954 pid_t inClientProcessID,
955 const AudioObjectPropertyAddress *inAddress,
956 UInt32 inQualifierDataSize,
957 const void *inQualifierData,
958 UInt32 inDataSize,
959 UInt32 *outDataSize,
960 void *outData) {
961 // declare the local variables
962 OSStatus theAnswer = 0;
963
964 // check the arguments
965 FailWithAction(inDriver != gAudioServerPlugInDriverRef,
966 theAnswer = kAudioHardwareBadObjectError,
967 Done,
968 "GetPropertyData: bad driver reference");
969 FailWithAction(
970 inAddress == NULL, theAnswer = kAudioHardwareIllegalOperationError, Done, "GetPropertyData: no address");
971 FailWithAction(outDataSize == NULL,
972 theAnswer = kAudioHardwareIllegalOperationError,
973 Done,
974 "GetPropertyData: no place to put the return value size");
975 FailWithAction(outData == NULL,
976 theAnswer = kAudioHardwareIllegalOperationError,
977 Done,
978 "GetPropertyData: no place to put the return value");
979
980 // Note that for each object, this driver implements all the required properties plus a few
981 // extras that are useful but not required.
982 //
983 // Also, since most of the data that will get returned is static, there are few instances where
984 // it is necessary to lock the state mutex.
985 switch (inObjectID) {
986 case kObjectID_PlugIn:
987 theAnswer = GetPlugInPropertyData(inDriver,
988 inObjectID,
989 inClientProcessID,
990 inAddress,
991 inQualifierDataSize,
992 inQualifierData,
993 inDataSize,
994 outDataSize,
995 outData);
996 break;
997
998 case kObjectID_Box:
999 theAnswer = GetBoxPropertyData(inDriver,
1000 inObjectID,
1001 inClientProcessID,
1002 inAddress,
1003 inQualifierDataSize,
1004 inQualifierData,
1005 inDataSize,
1006 outDataSize,
1007 outData);
1008 break;
1009

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected