Sets various properties for a port or the entire client.
Function
- int LV_SRE_SetPropertyEx(HPORT hport, int PropertyName, int ValueType, void* pvalue, int target = PROP_EX_TARGET_PORT, int index = 0)
Parameters
hport
Which port to apply the property to.
PropertyName
Which property to modify. See Speech Port Properties for list of properties.
ValueType
The value type of the property being set. Legal values are:
PROP_EX_VALUE_TYPE_INT
PROP_EX_VALUE_TYPE_INT_PTR
PROP_EX_VALUE_TYPE_STRING
PROP_EX_VALUE_TYPE_FLOAT_PTR
Each property has a set of legal set of value types. See Speech Port Properties for value types available for each property.
pvalue
A pointer to the new value for the PropertyName specified. pvalue will be reinterpreted according to the ValueType provided.
target
The portion of the API that this property is set for. Legal values are:
PROP_EX_TARGET_PORT -- pvalue affects an entire speech port object
PROP_EX_TARGET_CLIENT -- pvalue is global, and affects all ports on the client.
Return Values
LV_SUCCESS
No errors. Property was set to specified value
LV_INVALID_HPORT
The input hport is not a valid one.
LV_INVALID_PROPERTY_VALUE
The value is invalid for the designated property (e.g. out of range).
LV_INVALID_PROPERTY_TARGET
The property cannot be set for the specified target.
LV_INVALID_PROPERTY_VALUE_TYPE
The property's type is incompatible with the declared type.
LV_INVALID_PROPERTY
The property does not exist.
LV_EXCEPTION
An exception occurred while processing the request.
Remarks
In 10.2 and prior, due to a bug, setting PROP_EX_BUILTIN_GRAMMAR_LANGUAGE to PROP_EX_TARGET_CLIENT returns 0 if pvalue is NULL and 1 for success. This has been fixed for the next release.
The targets PROP_EX_TARGET_CHANNEL and PROP_EX_TARGET_GRAMMAR are deprecated
See Also