StreamVolumeSmoothingSet method |
|
Remarks
Sets the smoothing times, expressed in milliseconds, and related volume curve required to perform a fade-in after a PlaySound call or a fade-out after a StopSound call.
During the fading session the following events may be generated:
• | FadeInStarted, FadingVolumeChanged and FadeInCompleted after a call to the PlaySound method |
• | FadeOutStarted, FadingVolumeChanged and FadeOutCompleted after a call to the StopSound method |
Syntax
[Visual Basic] Public Function StreamVolumeSmoothingSet ( nPlayerIndex as Int16, bfadeIn as Boolean, nSlideDuration as Int32, nCurveType as enumVolumeCurves, nDesignerUniqueId as Int32 ) as enumErrorCodes |
[C#] public enumErrorCodes StreamVolumeSmoothingSet ( Int16 nPlayerIndex, bool bfadeIn, Int32 nSlideDuration, enumVolumeCurves nCurveType, Int32 nDesignerUniqueId ); |
[C++] public: enumErrorCodes StreamVolumeSmoothingSet ( Int16 nPlayerIndex, bool bfadeIn, Int32 nSlideDuration, enumVolumeCurves nCurveType, Int32 nDesignerUniqueId ); |
Parameter |
Description |
|||||||||||||||||||||
|
|
|||||||||||||||||||||
nPlayerIndex |
Number representing the zero-based index of the involved player |
|||||||||||||||||||||
bfadeIn |
Boolean value indicating if the smoothing, obtained through a volume sliding. must be applied on start or stop of playback. Supported values are the following: |
|||||||||||||||||||||
nSlideDuration |
The time required to perform the volume sliding after a call to the PlaySound or StopSound method. Accepted values are from 0 (default value, no sliding, immediate play or stop) to 20000: higher or lower values will be automatically cut to the nearest supported value. |
|||||||||||||||||||||
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 StreamVolumeSmoothingSetEx 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. |