Copyright © 2011-2019 MultiMedia Soft

SoundComposer.ItemDurationGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the duration of the audio stream that will reproduce the item. For noises, wave tones and sliding wave tones, the duration can be modified through the SoundComposer.ItemDurationSet method.

 

For sound file items, added through one between the SoundComposer.ItemSoundFileAdd, SoundComposer.ItemSoundFileMemoryAdd, SoundComposer.ItemSoundFileRawAdd and SoundComposer.ItemSoundFileMemoryRawAdd methods, this method will always return the original duration of the sound file without keeping count of eventual modifications performed through the SoundComposer.ItemSoundFileLoadRangeSet or SoundComposer.ItemSoundFileDurationStretch methods: for these specific changes you could know the modified duration through the SoundComposer.ItemSoundFileDurationGet.

 

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

 

 

Syntax

 

[Visual Basic]

Public Function ItemDurationGet (

nUniqueId as Int32,

ByRef nDuration as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes ItemDurationGet (

Int32 nUniqueId,

ref Int32 nDuration

);


 

[C++]

public: enumErrorCodes ItemDurationGet (

Int32 nUniqueId,

Int32 __gc *nDuration

);


 

Parameter

Description

 

 

nUniqueId

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

- SoundComposer.ItemDtmfStringAdd for DTMF items.

- SoundComposer.ItemNoiseAdd for noise tone items.

- SoundComposer.ItemSlidingWaveToneAdd for sliding wave tone items.

- SoundComposer.ItemSoundFileAdd, SoundComposer.ItemSoundFileMemoryAdd, SoundComposer.ItemSoundFileRawAdd, SoundComposer.ItemSoundFileMemoryRawAdd, SoundComposer.ItemSoundFileFromEditorAdd,and SoundComposer.ItemSoundFileFromRecorderAdd for sound file items

- SoundComposer.ItemWaveToneAdd for wave tone items.

- SoundComposer.ItemSpeechFromStringAdd and SoundComposer.ItemSpeechFromFileAdd for text to speech items.

nDuration

Reference that, on return from the method call, will contain the 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.