Copyright © 2008-2019 MultiMedia Soft

SoundComposer.ItemSoundFileVolumeFadingSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Predisposes parameters of the requested volume fading that will be applied to the given sound file item when it will be merged into the session's stream. Current parameters of a specific volume fading can be obtained through the SoundComposer.ItemSoundFileVolumeFadingGet method.

A specific volume fading can be removed through the SoundComposer.ItemSoundFileVolumeFadingRemove method.

 

The volume fading implemented by this method applies to the beginning (fade-in) or to the end (fade-out) of the sound file's audio stream. If you should need to add one or more linear volume sliding at specific positions of the sound file item, use the SoundComposer.ItemSoundFileVolumeSlidingAdd method.

 

For further details about sound composing see the the SoundComposer object and the How to compose a sound tutorial.

 

 

Syntax

 

[Visual Basic]

control.SoundComposer.ItemSoundFileVolumeFadingSet (

nUniqueId as Long,

bFadeIn as enumBoolean,

nFadeLengthMs as Long,

nCurveType as enumVolumeCurves,

nLeftX as Integer,

nLeftY as Integer,

nRightX as Integer,

nRightY as Integer

) as enumErrorCodes


 

[C++]

short control.SoundComposer.ItemSoundFileVolumeFadingSet (

long nUniqueId,

short bFadeIn,

long nFadeLengthMs,

short nCurveType,

short nLeftX,

short nLeftY,

short nRightX,

short nRightY

);


 

Parameter

Description

 

 

nUniqueId

The unique identifier of the sound file item previously returned by the call to one of the following methods: SoundComposer.ItemSoundFileAdd, SoundComposer.ItemSoundFileMemoryAdd, SoundComposer.ItemSoundFileRawAdd, SoundComposer.ItemSoundFileMemoryRawAdd, SoundComposer.ItemSoundFileFromEditorAdd,or SoundComposer.ItemSoundFileFromRecorderAdd.

bFadeIn

Boolean value specifying if the fading is a fade-in or a fade-out.

Supported values are the following:

Mnemonic Value

Meaning

BOOL_FALSE

This is a fade-out

BOOL_TRUE

This is a fade-in

nFadeLengthMs

Length of the fade expressed in milliseconds

nCurveType

Type of curve applied to perform the volume fading..

Supported values are the following:

Mnemonic constant

Value

Meaning

 

 

 

VOLUME_CURVE_NONE

0

No curve is applied: volume will be changed immediately and will be kept till next volume point.

VOLUME_CURVE_LINEAR

1

Linear curve

VOLUME_CURVE_EXPONENTIAL

2

Exponential curve

VOLUME_CURVE_COSINE

3

Cosine curve

VOLUME_CURVE_SMOOTH

4

Smooth curve

VOLUME_CURVE_CUSTOM

5

Custom Bézier curve.

 

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.

 

nLeftX

Horizontal position, expressed in percentage, of the left control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

nLeftY

Vertical position, expressed in percentage, of the left control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

nRightX

Horizontal position, expressed in percentage, of the right control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

nRightY

Vertical position, expressed in percentage, of the right control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful