Copyright © 2001-2018 MultiMedia Soft

SetSampleRate method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the sample rate applied to DirectSound buffer during playback. The use of this method will speed up the sound playback and voices will result altered as if an LP disc was played at wrong RPM rate. The current sample rate can be obtained through the GetSampleRate method.

Although the final result could be similar to the one obtained through the Effects.PlaybackRateSet method, this method is not based upon a DSP but acts directly on the DirectSound buffer by changing its frequency.

 

 

Syntax

 

[Visual Basic]

control.SetSampleRate (

nPlayer as Integer,

nSampleRate as Long

) as enumErrorCodes


 

[C++]

short control.SetSampleRate (

short nPlayer,

long nSampleRate

);


 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nSampleRate

Sample rate expressed in samples per second

 

 

Return value

 

Value

Meaning

 

 

Negative value

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

enumErrorCodes.ERR_NOERROR (0)

The call was successful.