• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
counting specific audio units in audiograph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
http://www.rsmrecords.com



 _______________________________________________
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

  • Prev by Date: Re: AudioServerPlugin : ASBD for clients (?)
  • Next by Date: Re: counting specific audio units in audiograph
  • Previous by thread: Re: mHostTime vs mSampleTime
  • Next by thread: Re: counting specific audio units in audiograph
  • Index(es):
    • Date
    • Thread