StreamVolumeSlide method |
|
Remarks
Starts a volume sliding procedure that brings the current volume to a target volume in a given amount of time. You can know if a volume sliding is already being performed through the StreamVolumeIsSliding method.
During the sliding the container application is notified through the CallbackForPlayersEvents delegate which is invoked every 15 milliseconds with the nEvent parameter set to EV_FADING_VOLUME_CHANGED and with the nData1 parameter containing the new volume
When the volume sliding reaches the target volume, the CallbackForPlayersEvents delegate which is invoked with the nEvent parameter set to EV_VOLUME_SLIDE_COMPLETED.
Syntax
[Visual Basic] Public Function StreamVolumeSlide ( nPlayerIndex as Int16, nSlideDuration as Int32, fVolumeTarget as Single, nScaleType as enumVolumeScales, nCurveType as enumVolumeCurves, nDesignerUniqueId as Int32 ) as enumErrorCodes |
[C#] public enumErrorCodes StreamVolumeSlide ( Int16 nPlayerIndex, Int32 nSlideDuration, float fVolumeTarget, enumVolumeScales nScaleType, enumVolumeCurves nCurveType, Int32 nDesignerUniqueId ); |
[C++] public: enumErrorCodes StreamVolumeSlide ( Int16 nPlayerIndex, Int32 nSlideDuration, float fVolumeTarget, enumVolumeScales nScaleType, enumVolumeCurves nCurveType, Int32 nDesignerUniqueId ); |
Parameter |
Description |
|||||||||||||||||||||
|
|
|||||||||||||||||||||
nPlayerIndex |
Number representing the zero-based index of the involved player |
|||||||||||||||||||||
nSlideDuration |
The time required to perform the volume sliding from the current volume level to the target level set into the fVolumeTarget parameter below. |
|||||||||||||||||||||
fVolumeTarget |
Target volume reached when the sliding is completed; the meaning of this value depends upon the nScaleType parameter below. |
|||||||||||||||||||||
nScaleType |
The volume scaling type. Supported values are the following:
|
|||||||||||||||||||||
nCurveType |
Type of curve applied to the volume sliding. 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.
If you don't want to display the custom curve designer on your user interface but you know the exact position of the control points to set, you can use the StreamVolumeSlideEx method. |
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. |