Can I list all RemoteIO audio devices currently in the application?

I would like to add an output pin callback through AudioUnitAddRenderNotifyto the currently active RemoteIO module, which outputs the sound to the speakers. I do not have access to the actual RemoteIO instance variable, but I would like to get a list of audio devices in the application and find this RemoteIO module this way. Is it possible?

+5
source share
2 answers

If you can access AUGraph, then it is possible. According to the AUGraph documentation, there are several ways to help you.

AUGraphGetNodeCount - AUGraphGetIndNode - node AUGraphNodeInfo - node

node, remoteIO . AUGraph .

+1

RemoteIO. , , "" . - , RemoteIO:

OSStatus status;
AudioComponentInstance audioUnit;

    // Describe audio component
AudioComponentDescription desc;
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_RemoteIO;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;

// Get component
AudioComponent outputComponent = AudioComponentFindNext(NULL, &desc);

// Get audio units
status = AudioComponentInstanceNew(outputComponent, &audioUnit);
checkStatus(status);
0

All Articles