Parameter odds and ends
Parameter odds and ends
- Subject: Parameter odds and ends
- From: Bill Stewart <email@hidden>
- Date: Wed, 30 Jul 2003 10:23:07 -0700
These are the implementation of two topics we discussed previously -
shortened paramter names and parameter clumps - comments?
kAudioUnitProprety_ParameterIDName AudioUnitParameterIDName (read)
An AudioUnit returns the full parameter name in the GetParameterInfo
struct/property.
In some display situations however, there may only be room for a few
characters, and
truncating this full name may give a less than optimal name for the
user. Thus,
this property can be used to ask the AU whether it can supply a
truncated name, with
the host suggesting a length (number of characters). If the AU
returns a longer
name than the host requests, that name maybe truncated to the
requested characters in display.
The AU could return a shorter name than requeseted as well. The AU
returns a CFString
that should be released by the host. When using this property, the
host asks for
the name in the same scope and element as the AU publishes the
parameter.
typedef struct AudioUnitParameterIDName {
AudioUnitParameterID inParamID;
SInt32 inDesiredLength;
CFStringRef *outName; // see comments for
kAudioUnitProprety_ParameterIDName
};
And: Clump it is :)
kAudioUnitParameterFlag_HasClump
We'll reclaim the next four bytes of the c-string parameter name
field....
char name[56]; // UTF8 encoded C string, may be treated as 56
characters
// if kAudioUnitParameterFlag_HasCFNameString not set
UInt32 clump; // only valid if kAudioUnitParameterFlag_HasClump
CFStringRef cfNameString; // only valid if
kAudioUnitParameterFlag_HasCFNameString
Thus, if a parameter says it has a clump, then you can get the clump
number from the paramter info struct, then when displaying them, you
can clump them in together :) I think I like it, its a word that an
Australian would use, and its both a noun (which clump) and a verb
(clump them together) - maybe I should add a "mate" after it somewhere
- you can clump them in together mate! - I really need to get out
more... :)
Bill
ps - thanks to Chris Reed's suggestion for the IDName...
--
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.