首页 > Computer > XACT > How to: Use XACT Cue Instance Variables
2009
02-13

How to: Use XACT Cue Instance Variables

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

  1. Load the global settings file (.xgs) from an XACT GUI project into a buffer.
  2. 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

XACTVARIABLEVALUE variableValue; pCue->GetVariable(iCueVariable,&variableValue);

To set the value of a cue instance variable

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.

最后编辑:
作者:wy182000
这个作者貌似有点懒,什么都没有留下。

留下一个回复