Remarks
Adds a trigger to the given player at a certain song position: when the trigger is reached, the TriggerReached event is fired.
Triggers positioning is always referred to the original sound duration, meaning that it won't keep count of eventual tempo and/or playback rate changes and will always refer to the position of the song as it should be played at its original speed.
See the How to add Triggers and Cue Points to a player section for further details about triggers.
Syntax
[Visual Basic]
Public Function TriggersAdd (
nPlayerIndex as Int16,
nTriggerID as Int16,
nTriggerPos as Int32
) as enumErrorCodes
|
|
[C#]
public enumErrorCodes TriggersAdd (
Int16 nPlayerIndex,
Int16 nTriggerID,
Int32 nTriggerPos
);
|
|
[C++]
public: enumErrorCodes TriggersAdd (
Int16 nPlayerIndex,
Int16 nTriggerID,
Int32 nTriggerPos
);
|
|
Parameter
|
Description
|
|
|
nPlayer
|
Number representing the zero-based index of the involved player
|
nTriggerID
|
Number representing the identifier of the new trigger.
If this identifier should be already assigned to another trigger, an error code would be returned.
|
nTriggerPos
|
Number representing the trigger position; it's effective value depends upon the value of the ScaleUnits property.
If this position should be already assigned to an existing trigger, an error code would be returned.
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred (see the LastError property for further error details)
|
enumErrorCodes.NOERROR (0)
|
The method call was successful.
|
|