counting specific audio units in audiograph
counting specific audio units in audiograph
- Subject: counting specific audio units in audiograph
- From: Robert Carroll <email@hidden>
- Date: Mon, 02 Dec 2013 16:55:15 -0500
I need to track the current number of filePlayer audiounits in an audiograph that has several other AU types.
int i; int filePlayerCount = 0; AUNode myNode; AudioComponentDescription testDescription; for (i = 0; i < myNodeCount; i++) { result = AUGraphGetIndNode ( processingGraph, i, &myNode ); if (noErr != result) {[self printErrorMessage: @"AUGraphGetIndNode failed" withStatus: result]; return;} // Obtain the audio unit instance from its corresponding node. result = AUGraphNodeInfo ( processingGraph, myNode, &testDescription, NULL ); if (noErr != result) {[self printErrorMessage: @"AUGraphNodeInfo failed" withStatus: result]; return;} if (testDescription.componentSubType == kAudioUnitSubType_AudioFilePlayer) { //filePlayerCount++; filePlayerCount = filePlayerCount + 1; } } NSLog(@"countFilePlayerNodes is %d", filePlayerCount);
The overall node count is correct, but this code always returns 0. Is this not a correct way to evaluate the component subType?
any suggestions would be appreciated.
thanks,
rob
Robert Carroll RSM Records Toronto
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden