SoundGenerator.SlidingWaveToneGenerate method |
|
Remarks
Generates and load into the editor a sliding wave tone audio stream. This method allows sliding the wave tone frequency and/or the wave tone amplitude.
For further details about sound generation see the SoundGenerator object and the How to generate wave tones, noises, DTMF tones and text to speech tutorial.
Syntax
[Visual Basic] control.SoundGenerator.SlidingWaveToneGenerate ( nWaveType as enumSoundGenSlidingWaveTypes, nSampleRate as Long, nChannels as Integer, fFrequencyStart as Single, fFrequencyEnd as Single, fAmplitudeStart as Single, fAmplitudeEnd as Single, bLogInterpolation as enumBoolean, nDurationMs as Long, nFadeInMs as Long, nFadeOutMs as Long ) as enumErrorCodes |
[C++] short control.SoundGenerator.SlidingWaveToneGenerate ( short nWaveType, long nSampleRate, short nChannels, float fFrequencyStart, float fFrequencyEnd, float fAmplitudeStart, float fAmplitudeEnd, short bLogInterpolation, long nDurationMs, long nFadeInMs, long nFadeOutMs ); |
Parameter |
Description |
|||||||||||||||
|
|
|||||||||||||||
nWaveType |
Type of wave tone. Supported values are the following:
|
|||||||||||||||
nSampleRate |
Sample rate of the stream, e.g. 44100 |
|||||||||||||||
nChannels |
Number of channels of the audio stream. Supported values are the following:
|
|||||||||||||||
fFrequencyStart |
Initial wave tone frequency expressed in Hertz, e.g. 700 |
|||||||||||||||
fFrequencyEnd |
Final wave tone frequency expressed in Hertz, e.g. 1000 |
|||||||||||||||
fAmplitudeStart |
Initial wave tone amplitude. - value 0.0 means that sound volume is muted - values higher than 0.0 and lower than 1.0 attenuates the sound volume - value 1.0 sets the sound at full volume - values higher than 1.0 amplifies the sound volume |
|||||||||||||||
fAmplitudeEnd |
Final wave tone amplitude. - value 0.0 means that sound volume is muted - values higher than 0.0 and lower than 1.0 attenuate the sound volume - value 1.0 sets the sound at full volume - values higher than 1.0 amplify the sound volume |
|||||||||||||||
bLogInterpolation |
Boolean value indicating if the sliding should use linear or logarithmic interpolation. Supported values are the following:
|
|||||||||||||||
nDurationMs |
Duration of the wave tone expressed in milliseconds. |
|||||||||||||||
nFadeInMs |
Duration of the fade-in at the beginning of the wave tone expressed in milliseconds. Set this value to 0 if you don't need to apply a fade-in at the beginning of the audio stream. |
|||||||||||||||
nFadeOutMs |
Duration of the fade-out at the end of the wave tone expressed in milliseconds. Set this value to 0 if you don't need to apply a fade-out at the end of the audio stream. |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred, check the LastError property value in order to see the error code meaning |
enumErrorCodes.ERR_NOERROR (0) |
The method call was successful. |