Copyright © 2005-2019 MultiMedia Soft

Effects.PlaybackRateSet method

Previous pageReturn to chapter overviewNext page



Changes both the sound tempo and pitch, as if an LP disc was played at wrong RPM rate. The use of this method will speed up the sound playback and voices will result altered; if you don't want to alter voices, use the Effects.PlaybackTempSet method. The current rate percentage can be obtained through the Effects.PlaybackRateGet method.  The current effective playback rate ratio, that may be also affected by the Effects.PlaybackTempSet method, can be obtained through the Effects.PlaybackRateRatioGet method.


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 CallbackForPlayersEvents delegate with the nEvent parameter set to EV_DURATION_CHANGED. The new duration can also be obtained through the SoundDurationGet and SoundDurationStringGet methods by setting the bKeepCountOfRateChange parameter to "true".


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

See the How to apply special effects to a playing sound section for further details.





[Visual Basic]

Public Function PlaybackRateSet (

nPlayerIndex as Int16,

fRatePerc As Single

) as enumErrorCodes



public enumErrorCodes PlaybackRateSet (

Int16 nPlayerIndex,

float fRatePerc




public: enumErrorCodes PlaybackRateSet (

Int16 nPlayerIndex,

float fRatePerc









Number representing the zero-based index of the involved player


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

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



Return value






Negative value

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

enumErrorCodes.NOERROR (0)

The method call was successful.