Copyright © 2011-2019 MultiMedia Soft

SoundComposer.ItemSoundFileDurationGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the current effective duration of the sound file item by keeping count of eventual duration changes subsequent to the usage of the SoundComposer.ItemSoundFileLoadRangeSet or SoundComposer.ItemSoundFileDurationStretch methods.

 

The returned value doesn't keep count of eventual loops requested through the SoundComposer.ItemSoundFileLoopSet method: when more than one loop is applied you may obtain the effective duration by multiplying the value returned by this method with the current number of loops returned by a call to the SoundComposer.ItemSoundFileLoopGet 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 ItemSoundFileDurationGet (

nUniqueId as Int32,

ByRef nDurationMs as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes ItemSoundFileDurationGet (

Int32 nUniqueId,

ref Int32 nDurationMs

);


 

[C++]

public: enumErrorCodes ItemSoundFileDurationGet (

Int32 nUniqueId,

Int32 __gc  *nDurationMs

);


 

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.

nDurationMs

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