18 Creating and Managing Controllers
Q3Controller_GetValues
function to get the list of values of a controller.
TQ3Status Q3Controller_GetValues ( TQ3ControllerRef controllerRef, unsigned long valueCount, float *values, TQ3Boolean *changed, unsigned long *serialNumber);controllerRef
A reference to a controller.valueCount
The number of elements in the array pointed to by thevalues
parameter.values
On entry, a pointer to an array of controller values. The size of the array is determined by the number of elements in the array (as specified by thevalueCount
parameter) and the size of a controller value (which is controller-dependent).changed
On exit, a Boolean value that indicates whether the specified array of values was changed (kQ3True
) or not (kQ3False
).serialNumber
On entry, a controller serial number, orNULL
.
Q3Controller_GetValues
function returns, in the values
parameter, a pointer to an array that contains the current values for the controller specified in the controllerRef
parameter. The valueCount
parameter specifies the number of elements in the array (which you must already have allocated). Q3Controller_GetValues
might fill in fewer elements if the controller does not support the specified number of values.
If the value of the serialNumber
parameter is NULL
, Q3Controller_GetValues
fills in the values
array and returns the value kQ3True
in the changed
parameter. Otherwise, the value specified in the serialNumber
parameter is compared with the controller's current serial number. If the two serial numbers are identical, Q3Controller_GetValues
leaves the values
array and the serialNumber
parameter unchanged and returns the value kQ3False
in the changed
parameter. If the two serial number differ, Q3Controller_GetValues
fills in the values
array, updates the serialNumber
parameter, and returns the value kQ3True
in the changed
parameter.
If the specified controller is inactive, the values
array and the changed
parameter are unchanged.
Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker