• 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
Audio Component Count "Badness"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Audio Component Count "Badness"


  • Subject: Audio Component Count "Badness"
  • From: Andrew James <email@hidden>
  • Date: Tue, 2 Nov 2010 01:18:56 -0700 (PDT)

All,

I'm seeing a discrepency between audio component counts when I use auval and my code when using AudioComponentFindNext.  I'm hoping someone can enlighten me in regards to some misunderstanding illustrated by my code.

Here is the auval output for music devices on my machine.  We can see that there are 8 music devices

Initial-Installers-Mac-Pro:/ ajames$ auval -s aumu

  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         AU Validation Tool
         Version: 1.6.1a1 
          Copyright 2003-2007, Apple, Inc. All Rights Reserved.

         Specify -h (-help) for command options
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

aumu Clm5 -NI-  -  Native Instruments: Absynth 5
aumu NBa3 -NI-  -  Native Instruments: Battery 3
aumu NiKP -NI-  -  Native Instruments: Kore Player
aumu NiMa -NI-  -  Native Instruments: Massive
aumu NiR5 -NI-  -  Native Instruments: Reaktor5
aumu Nif8 -NI-  -  Native Instruments: FM8
aumu Nik4 -NI-  -  Native Instruments: Kontakt 4
aumu dls  appl  -  Apple: DLSMusicDevice

I call my code in the following way to get all music devices and only receive 3 for Battery, Kontakt, and DLSMusicDevice


        // populate pop up with specific types
        [ self _populateMenuForType: kAudioUnitType_MusicDevice ];


Below is the implementation of the _populateMenuForType method:


- ( void ) _populateMenuForType: ( OSType ) compType
{
        AudioComponentDescription acDescription;
        AudioComponent ac = NULL;
        
        // zero out and look for music devices from any manufacturer
        memset( &acDescription, 0, sizeof( AudioComponentDescription ) );
        acDescription.componentType = compType;
        
        NSLog( @"DEBUG:  Looking for %d audio components", AudioComponentCount( &acDescription ) );
                
        // add matching audio components
        while( ( ac = AudioComponentFindNext( ac, &acDescription ) ) != NULL )
        {
                CFStringRef acName = NULL;
                                
                if( AudioComponentCopyName( ac, &acName ) == noErr )
                {
                        NSString *tempName = [ ((NSString *)acName) autorelease ];
                        
                        // store name as title
                        [ _instrComponents addItemWithTitle: tempName ];
                        
                        // store audio component as represented object
                        [ [ _instrComponents lastItem ] setRepresentedObject: [ NSValue valueWithPointer: ac ] ];
                }
                else
                {
                        NSLog(  @"ERROR:  Unable to get name for audio component" );
                }

        }

}

Anyone see my flaw?  BTW I don't get any output indicating the code was unable to get the audio component name.

Cheers,
--aj
 _______________________________________________
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

  • Follow-Ups:
    • Re: Audio Component Count "Badness"
      • From: Anders Norlander <email@hidden>
  • Prev by Date: Re: audio-specific UI component libraries for Cocoa?
  • Next by Date: Airplay using remoteIO/audiounit failing on ios4.2GM
  • Previous by thread: RE: AudioQueue Services approximate latency?
  • Next by thread: Re: Audio Component Count "Badness"
  • Index(es):
    • Date
    • Thread