Copyright © 2008-2019 MultiMedia Soft

SoundComposer.ItemSoundFileLoopSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the number of times a specific sound file item is applied to the audio stream. The current number of loops applied to the item can be obtained through the SoundComposer.ItemSoundFileLoopGet method.

 

If the loading range of the sound item should have been reduced through the SoundComposer.ItemSoundFileLoadRangeSet method, loops will be applied to the loading range only.

 

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

 

 

Syntax

 

[Visual Basic]

Public Function ItemSoundFileLoopSet (

nUniqueId as Int32,

nLoops as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes ItemSoundFileLoopSet (

Int32 nUniqueId,

ref nLoops

);


 

[C++]

public: enumErrorCodes ItemSoundFileLoopSet (

Int32 nUniqueId,

Int16 nLoops

);


 

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.

nLoops

Number representing the number of times the sound file item is applied to the audio stream.

Can be a number within the range 0 - 1000; values outside this range will be automatically cut to the nearest accepted value.

If this parameter is set to 0 or 1 no loop is applied.

If this parameter is set to 2 the sound is applied twice, if this parameter is set to 3 the sound is applied three times and so on.

When one or more loops are requested, the eventual setting applied through the SoundComposer.ItemSoundFileDurationStretch method is ignored.

 

 

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.