Re: 3rd party AU vendor info
Re: 3rd party AU vendor info
- Subject: Re: 3rd party AU vendor info
- From: Bill Stewart <email@hidden>
- Date: Wed, 16 Oct 2002 18:07:29 -0700
There's an example that looks similar to this, in the SDK In the generic
view classes - where we pull out both the manufacturer name and audio unit
name from the component name string
This uses the convention of formatting that string as:
Manu name: AU Name
(And yes, we will address this kind of ugly hack when we revisit the whole
meta-data issue)
Bill
on 16/10/02 2:39 PM, Robert Grant wrote:
>
The name is available directly from the GetComponentInfo function but
>
it's still
>
kind of buried.
>
>
Here's the code I adapted from the SoundConverter example code to get
>
the name
>
out of a Component. There's probably a simpler way :-). I still don't
>
know how to get the
>
info text.
>
>
Handle name = NewHandle(0);
>
char cname[256];
>
while (theAUComponent != NULL){
>
ComponentDescription theDesc;
>
GetComponentInfo(theAUComponent, &theDesc, name, nil, nil);
>
if (theDesc.componentManufacturer !=
>
kAudioUnitManufacturer_Apple) {
>
HLock( name );
>
char* length = *name;
>
strncpy(cname, (char*)((*name)+1), length[0]);
>
cname[length[0]] = 0;
>
HUnlock( name );
>
}
>
theAUComponent = FindNextComponent (theAUComponent, &desc);
>
}
>
DisposeHandle( name );
>
>
Robert.
>
>
On Wednesday, October 16, 2002, at 03:58 PM, Robert Grant wrote:
>
>
> I'm expanding my app into hosting 3rd party AUs and I'm trying to
>
> build a menu
>
> of 3rd party effects but nowhere can I find a property that'll give me
>
> a human
>
> readable name for the effect (except maybe "CurrentContext" but I want
>
> a context
>
> free name).
>
>
>
> I'm now thinking that it's in the ComponentInfo stuff (looking at the
>
> Java examples) but
>
> I'm not sure how to work with this in C (from Components.h):
>
>
>
> struct ResourceSpec {
>
> OSType resType; /* 4-byte code */
>
> short resID; /* */
>
> };
>
> typedef struct ResourceSpec ResourceSpec;
>
> struct ComponentResource {
>
> ComponentDescription cd; /* Registration
>
> parameters */
>
> ResourceSpec component; /* resource where
>
> Component code is found */
>
> ResourceSpec componentName; /* name string resource
>
> */
>
> ResourceSpec componentInfo; /* info string resource
>
> */
>
> ResourceSpec componentIcon; /* icon resource */
>
> };
>
>
>
> The info I want is in componentName I believe but how to I get it out
>
> of a ResourceSpec.
>
>
>
> Thanks,
>
>
>
> Robert.
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.