Re: Audio Component Count "Badness"
Re: Audio Component Count "Badness"
- Subject: Re: Audio Component Count "Badness"
- From: Anders Norlander <email@hidden>
- Date: Tue, 2 Nov 2010 14:32:27 +0100
Make sure your executable and components support the same architectures.
For example, if your executable is x86-64 only, like in a debug build, then the component
must also support that architecture.
You can use tools like file or otool to see what architectures a binary supports:
file /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio
Or just build a universal binary and run it too see if the results are different,
if they are the cause is the above mentioned (don't run it in the debugger).
-Anders
On 2010-11-02, at 9:18 , Andrew James wrote:
> 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
_______________________________________________
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