Copyright © 2005-2011 MultiMedia Soft

SetTempoPerc method

Previous pageReturn to chapter overviewNext page

Remarks

 

Changes the sound to play at faster or slower speed than original, without affecting the sound pitch so voices won't result altered.

This method doesn't work with sounds with more than 2 channels (5.1 or 7.1) or if the EnableMixingFeatures property has been set to false.

 

When dealing with video clips, calls to this method will have no effect if the video clip has not been loaded with the VideoPlayer.LoadForTempoChange, VideoPlayer.LoadFromMemoryForTempoChange, VideoPlayer.LoadFromMemorySyncForTempoChange or VideoPlayer.LoadSyncForTempoChange methods.

 

After a successful call to this method, the duration of the song will change: the new duration, expressed in seconds, is notified through the SoundDurationChanged event. The new duration can also be obtained through the GetUpdatedSoundDuration and GetUpdatedFormattedSoundDuration methods.

 

Further details about songs mixing can be found inside the How to mix your songs section.

 

 

Syntax

 

[Visual Basic]

Public Function SetTempoPerc (

nPlayerIndex as Int16,

fTempPerc as float

) as enumErrorCodes


 

[C#]

public enumErrorCodes SetTempoPerc (

Int16 nPlayerIndex,

float fTempPerc

);


 

[C++]

public: enumErrorCodes SetTempoPerc (

Int16 nPlayerIndex,

float fTempPerc

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nTempoPerc

The Tempo variation expressed in percentage; supported values are from -90 to 90.

Setting this parameter to 0 will set the original sound tempo value.

Usually best mixing results are obtained with values from -15 to 15.

 

 

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.