How to: Use XACT Cue Instance Variables
How to use cue instance variables created with the XACT GUI is described.
To initialize the XACT engine to use cue instance variables
- Load the global settings file (.xgs) from an XACT GUI project into a buffer.
-
When initializing XACT as in How To: Initialize XACT, change step 2 to include parameters referencing the global settings file.
Note This is accomplished by setting the pGlobalSettingsBuffer, the globalSettingsBufferSize, and the globalSettingsFlags members of the XACT_RUNTIME_PARAMETERSstructure. These structure members specify the buffer containing the .xgs file, set the size of the buffer, and assign XACT responsibility for freeing memory allocated for the buffer.
-
EngineParameters.pGlobalSettingsBuffer = pvGlobalSettingsData; EngineParameters.globalSettingsBufferSize = dwGlobalSettingsFileSize; EngineParameters.globalSettingsFlags = XACT_FLAG_GLOBAL_SETTINGS_MANAGEDATA;
-
To get the index of a cue instance variable
-
Call the IXACT3Cue::GetVariableIndex method with the variable name.
Note All methods for manipulating a cue variable require the cue variable’s index.
-
XACTVARIABLEINDEX iCueVariable = pCue->GetVariableIndex("RPM");
To get the value of a cue instance variable
-
Call IXACT3Cue::GetVariable with the variable’s index.
-
XACTVARIABLEVALUE variableValue; pCue->GetVariable(iCueVariable,&variableValue);
To set the value of a cue instance variable
-
Call IXACT3Cue::SetVariable with the variable’s index and the variable’s new value.
-
variableValue = 3000; pCue->SetVariable(iCueVariable,variableValue);
Related Topics
- XACT Variables (XACT API)
- Provides an overview of using XACT variables in the XACT API.
- XACT Variables (XACT GUI)
- Provides an example of creating variables with the XACT GUI.
- XACT File Types
- Provides an overview of the files created by an XACT GUI project.
- 本文固定链接: http://www.wy182000.com/2009/02/13/how-to-use-xact-cue-instance-variables/
- 转载请注明: wy182000 于 Studio 发表