Newbie questions re:kAudioUnitProperty_ParameterList
Newbie questions re:kAudioUnitProperty_ParameterList
- Subject: Newbie questions re:kAudioUnitProperty_ParameterList
- From: joel pigdon <email@hidden>
- Date: Wed, 12 Nov 2003 16:13:55 -0800 (PST)
I am very much a CoreAudio/Audio Units newbie and I
have a few question about the way that the operation
of the AudioUnitGetProperty function. I am trying to
build a findUnits like program in C to gain a greater
understanding of audioUnits however I am unsure as to
how to go about using The AudioUnitsGetProperty
function. I have an AUnit and I just want to start off
by using the global scope. The first question is that
the documentation talks about an Element of which I
can find absolutely no information. If someone can
explain to me what an element is I would greatly
appreciate. I understand that the AudioUnitParameterID
is a Uint32 type so I am trying to put the result into
a UInt32. By setting the outData to NULL I can get the
data size being returned but I cannot seem to get the
actual data out. If I am being returned a pointer to
an UInt32 when I debug the out size is always 0 and
the UInt is always 0 also please help attached is code
snippet, I realise the dirtyness of this code:
ComponentDescription desc,temp;
Component current;
ComponentInstance auInst;
UInt32 paramsize;
Boolean wtable;
Handle name;
OSStatus error;
ConstStr255Param actualName;
UInt32 numBusses,size;
Float64 out;
desc.componentType = 'aufx';
desc.componentSubType = 0;
desc.componentManufacturer = 0;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
current = FindNextComponent(0,&desc);
while(current != NULL)
{
OpenAComponent(current,&auInst);
name = NewHandle(sizeof(void*));
GetComponentInfo(current,&temp,name,NULL,NULL);
HLock(name);
actualName = (ConstStr255Param)(*name);
//AudioUnitGetProperty(auInst,kAudioUnitProperty_ParameterList,0,0,&numBusses,&size);
AudioUnitGetProperty(auInst,kAudioUnitProperty_ParameterList,1,0,&numBusses,&size);
//AudioUnitGetProperty(auInst,kAudioUnitProperty_ParameterList,2,0,NULL,&size);
//AudioUnitGetProperty(auInst,kAudioUnitProperty_ParameterList,3,0,NULL,&size);
NSLog(@"out %s",actualName);
NSLog(@"busses %l",numBusses);
DisposeHandle(name);
current = FindNextComponent(current,&desc);
}
Thanks for any assistance you may be able to provide
Joel Pigdon
email@hidden
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
_______________________________________________
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.