|
PlaySoundRangeWithRate method |
![]() ![]()
|
Remarks
Plays a specified range of the sound under editing. This method doesn't have any effect and returns an error if the component is initialized through the InitEditorNoPlayback method.
Respect to the PlaySoundRange method, this method allows playing at lower or higher speeds and to start playback directly from the current position or by using an offset instead of a specific position.
IMPORTANT: This method doesn't have any effect if reversed sound management has not been enabled by a previous call to the SoundDirectionEnable method or by the WaveformScroller.PlaybackOnScrollEnable method..
A successful call to this method will fire the SoundPlaybackPlaying event. Once the playback session has been performed completely, the control will fire the SoundPlaybackDone event.
Syntax
[Visual Basic] Public Function PlaySoundRangeWithRate ( fFromPosition as Single, fToPosition as Single, bUseFinalPosAsOffset as Boolean, fSampleRateMultiplier as Single ) as enumErrorCodes |
[C#] public enumErrorCodes PlaySoundRangeWithRate ( float fFromPosition, float fToPosition, bool bUseFinalPosAsOffset, float fSampleRateMultiplier ); |
[C++] public: enumErrorCodes PlaySoundRangeWithRate ( float fFromPosition, float fToPosition, bool bUseFinalPosAsOffset, float fSampleRateMultiplier ); |
Parameter |
Description |
||||||
|
|
||||||
fFromPosition |
Start position, expressed in milliseconds, of the sound range to play. Set this value to -1 for starting playback from the current position. |
||||||
fToPosition |
End position, expressed in milliseconds, of the sound range to play. Set this value to -1 for playing till the song end. |
||||||
bUseFinalPosAsOffset |
Flag that specifies if the value set inside the fToPosition parameter should be considered as an offset respect to the start position or as a specific position. Supported values are the following:
|
||||||
fSampleRateMultiplier |
The sample rate multiplier applied to the sound stream. This value can range from 0.1 (meaning that the sound stream will be played at 10% of its normal speed, 10 times slower) up to 30.0 (meaning that the sound stream will be played at 3000% of its normal speed, 30 times faster). Values outside of the mentioned range will be automatically capped to the nearest valid value. A value of 1.0 will play the sound stream at its original sample rate. |
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 |