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

Function ProxyAudio_Create

proxyAudioDevice/ProxyAudioDevice.cpp:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67#pragma mark Factory
68
69void *ProxyAudio_Create(CFAllocatorRef inAllocator, CFUUIDRef inRequestedTypeUUID) {
70 // This is the CFPlugIn factory function. Its job is to create the implementation for the given
71 // type provided that the type is supported. Because this driver is simple and all its
72 // initialization is handled via static iniitalization when the bundle is loaded, all that
73 // needs to be done is to return the AudioServerPlugInDriverRef that points to the driver's
74 // interface. A more complicated driver would create any base line objects it needs to satisfy
75 // the IUnknown methods that are used to discover that actual interface to talk to the driver.
76 // The majority of the driver's initilization should be handled in the Initialize() method of
77 // the driver's AudioServerPlugInDriverInterface.
78
79#pragma unused(inAllocator)
80 void *theAnswer = NULL;
81 if (CFEqual(inRequestedTypeUUID, kAudioServerPlugInTypeUUID)) {
82 theAnswer = gAudioServerPlugInDriverRef;
83 }
84 return theAnswer;
85}
86
87ProxyAudioDevice *ProxyAudioDevice::deviceForDriver(void *inDriver) {
88#pragma unused(inDriver)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected