Copyright © 2008-2018 MultiMedia Soft

SoundComposer.ItemSoundFileDurationStretch method

Previous pageReturn to chapter overviewNext page



Stretches the duration of the sound file by modifying its tempo and without changing the original pitch. After the time stretch, the updated duration can be obtained through the SoundComposer.ItemSoundFileDurationGet method.


The tempo change algorithm is always applied to the full sound file: a call to this method will return an error if the loading range should have been modified through the SoundComposer.ItemSoundFileLoadRangeSet method.


This setting is ignored when more than one loop is requested through the SoundComposer.ItemSoundFileLoopSet method.


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





[Visual Basic]

Public Function ItemSoundFileDurationStretch (

nUniqueId as Int32,

nDurationMs as Int32

) as enumErrorCodes



public enumErrorCodes ItemSoundFileDurationStretch (

Int32 nUniqueId,

Int32 nDurationMs




public: enumErrorCodes ItemSoundFileDurationStretch (

Int32 nUniqueId,

Int32 nDurationMs








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.


The modified duration expressed in milliseconds



Return value






Negative value

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

enumErrorCodes.NOERROR (0)

The method call was successful.