Copyright © 2011-2019 MultiMedia Soft

SoundComposer.ItemDurationSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Modifies the duration of the audio stream that will reproduce the item. The current duration can be obtained through the SoundComposer.ItemDurationGet method.

 

This method doesn't work for:

DTMF tones because the duration of the item strictly depends upon the number of characters inside the string itself and upon the duration of each single tone and of the silence between tones.
Text to speech because the duration of the item strictly depends upon the number of words and upon the presence of eventual XML markups.
Sound files: there is the possibility to reduce the loaded range through the the SoundComposer.ItemSoundFileLoadRangeSet method or to stretch the original duration through the SoundComposer.ItemSoundFileDurationStretch method.

 

For further details about sound composing see the the SoundComposerMan class and the How to compose a sound tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ItemDurationSet (

nUniqueId as Int32,

nDuration as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes ItemDurationSet (

Int32 nUniqueId,

Int32 nDuration

);


 

[C++]

public: enumErrorCodes ItemDurationSet (

Int32 nUniqueId,

Int32 nDuration

);


 

Parameter

Description

 

 

nUniqueId

The unique identifier of the element previously returned by the call to one of the following methods:

- SoundComposer.ItemNoiseAdd for noise tone items.

- SoundComposer.ItemSlidingWaveToneAdd for sliding wave tone items.

- SoundComposer.ItemWaveToneAdd for wave tone items.

nDuration

Duration of the item expressed in milliseconds.

 

 

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.