Finds a TagArg in list and returns its ta_Arg field.
TagData GetTagArg (const TagArg *tagList, uint32 tag,TagData defaultValue)
This function calls FindTagArg()
to locate the specified tag. If it is found, it returns the ta_Arg value from the found TagArg. Otherwise, it returns the default value supplied. This is handy when resolving a tag list that has optional tags that have suitable default values.
ta_Arg value from found TagArg or defaultValue.
Convenience call implemented in clib.lib V24.
void dosomething (const TagArg *tags) { uint32 amplitude = (uint32)GetTagData (tags, MY_TAG_AMPLITUDE, (TagData)0x7fff); . . . }
It's a good idea to always use casts for the default value and result. Don't assume anything about the type definition of TagData other than that it is a 32-bit value.
FindTagArg
(), NextTagArg()