Copyright © 2001-2019 MultiMedia Soft

StreamVolumeSmoothingSetEx method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the smoothing times, expressed in milliseconds, and related volume curve required to perform a fade-in after a PlaySound call and 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]

control.StreamVolumeSmoothingSetEx (

nPlayer as Integer,

bfadeIn as enumBoolean,

nSlideDuration as Long,

nCurveType as enumVolumeCurves,

nLeftX as Integer,

nLeftY as Integer,

nRightX as Integer,

nRightY as Integer

) as enumErrorCodes


 

[C++]

short control.StreamVolumeSmoothingSetEx (

short nPlayer,

short bfadeIn,

long nSlideDuration,

short nCurveType,

short nLeftX,

short nLeftY,

short nRightX,

short nRightY

);


 

 

Parameter

Description

 

 

nPlayer

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:

Mnemonic constant

Meaning

false

The volume slide setting is intended as a fade-out activated when the StopSound method is invoked.

true

The volume slide setting is intended as a fade-in activated when the PlaySound method is invoked.

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:

Mnemonic constant

Value

Meaning

 

 

 

VOLUME_CURVE_LINEAR

1

Linear curve

amp3dj_i000090

VOLUME_CURVE_EXPONENTIAL

2

Exponential curve

amp3dj_i000091

VOLUME_CURVE_COSINE

3

Cosine curve

amp3dj_i000092

VOLUME_CURVE_SMOOTH

4

Smooth curve

amp3dj_i000093

VOLUME_CURVE_CUSTOM

5

Custom Bézier curve.

amp3dj_i000094

nLeftX

The horizontal position, expressed in percentage of the custom curve designer's area, of the left control point (*). This parameter is ignored if the nScaleType parameter above has been set to a value different from VOLUME_CURVE_CUSTOM.

nLeftY

The vertical position, expressed in percentage of the custom curve designer's area, of the left control point (*). This parameter is ignored if the nScaleType parameter above has been set to a value different from VOLUME_CURVE_CUSTOM.

nRightX

The horizontal position, expressed in percentage of the custom curve designer's area, of the right control point (*). This parameter is ignored if the nScaleType parameter above has been set to a value different from VOLUME_CURVE_CUSTOM.

nRightY

The vertical position, expressed in percentage of the custom curve designer's area, of the right control point (*). This parameter is ignored if the nScaleType parameter above has been set to a value different from VOLUME_CURVE_CUSTOM.

 

 

(*) 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.

 

amp3dj_i00009a

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.