SoundComposer.ItemDurationGet method |
|
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 SoundComposer object and the How to compose a sound tutorial.
Syntax
[Visual Basic] control.SoundComposer.ItemDurationGet ( nUniqueId as Long, ByRef nDuration as Long ) as enumErrorCodes |
[C++] short control.SoundComposer.ItemDurationGet ( long nUniqueId, long *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, check the LastError property value in order to get the error code |
enumErrorCodes.ERR_NOERROR (0) |
The method call was successful |