VolumeAutomation.PointAdd method |
|
Remarks
Adds a new volume point to the volume automation procedure.
Modifications won't be immediately applied if loaded sound should be already playing and will take effect only after completing/stopping and restarting the playback session.
For details about using Volume Automation refer to the How to manage Volume Automation tutorial.
Syntax
[Visual Basic] Public Function PointAdd ( nPlayerIndex as Int16, strVolumePointName as String, fPosition as Single, fVolumeLevel as Single, nCurveType as enumVolumeCurves, nDesignerUniqueId as Int32 ) as enumErrorCodes |
[C#] public enumErrorCodes PointAdd ( Int16 nPlayerIndex, string strVolumePointName, float fPosition, float fVolumeLevel, enumVolumeCurves nCurveType, Int32 nDesignerUniqueId ); |
[C++] public: enumErrorCodes PointAdd ( Int16 nPlayerIndex, string strVolumePointName, float fPosition, float fVolumeLevel, enumVolumeCurves nCurveType, Int32 nDesignerUniqueId ); |
Parameter |
Description |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
nPlayerIndex |
Number representing the zero-based index of the involved player |
||||||||||||||||||||||||
strVolumePointName |
String representing the friendly name of the volume point to add: there is no naming convention so you are free to decide your own set of names. This name will be used in next calls that will act on this specific volume point. |
||||||||||||||||||||||||
fPosition |
Position of the volume point expressed in the same unit set into the VolumeAutomation.PositionUnit property. |
||||||||||||||||||||||||
fVolumeLevel |
Volume level expressed in the same unit set into the VolumeAutomation.ScaleType property |
||||||||||||||||||||||||
nCurveType |
Type of curve applied to reach the next volume point. Supported values are the following:
|
||||||||||||||||||||||||
nDesignerUniqueId |
Unique identifier of the curve editor control containing custom curve settings to apply. This unique identifier is returned by a previous call to the VolumeAutomation.CurveDesigner.Create method.
The custom curve designer manages a windowed control, whose visual aspect can be defined programmatically, which allows designing volume curves based upon Bézier curves whose shape is defined through the manual positioning of 2 control points (displayed in cyan color on the graphic below). For further information about the use of the embedded CurveDesigner refer to the tutorial How to create custom volume curves.
This parameter is ignored if the nScaleType parameter above has been set to a value different from VOLUME_CURVE_CUSTOM. |
Return value
Value |
Meaning |
|
|
enumErrorCodes.NOERROR (0) |
The method call was successful |
Negative value |
An error occurred: see the LastError property for further error details or for a list of the possible error values. |