Copyright © 2008-2023 MultiMedia Soft

SoundGenerator.DtmfStringGenerate method

Previous pageReturn to chapter overviewNext page

Remarks

 

Generates and load into the editor a DTMF (Dual Tone Multi Frequency) audio stream.

 

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.DtmfStringGenerate (

strDtmf as String,

nSampleRate as Long,

nChannels as Integer,

nToneDurationMs as Long,

nSilenceDurationMs as Long,

nFadeInMs as Long,

nFadeOutMs as Long,

fAmplitude as Single

) as enumErrorCodes


 

[C++]

short control.SoundGenerator.DtmfStringGenerate (

LPCTSTR strDtmf,

long nSampleRate,

short nChannels,

long nToneDurationMs,

long nSilenceDurationMs,

long nFadeInMs,

long nFadeOutMs,

float fAmplitude

);


 

 

Parameter

Description

 

 

strDtmf

String containing DTMF characters that will dial the phone number

nSampleRate

Sample rate of the stream, e.g. 44100

nChannels

Number of channels of the audio stream.

Supported values are the following:

Value

Meaning

1

Mono audio stream

2

Stereo audio stream

4

3.1 audio stream

6

5.1 audio stream

8

7.1 audio stream

nToneDurationMs

Duration of each DTMF tone expressed in milliseconds

nSilenceDurationMs

Duration of silence between each DTMF tone expressed in milliseconds

nFadeInMs

Duration of the fade-in at the beginning of each DTMF tone expressed in milliseconds. Set this value to 0 if you don't need to apply a fade-in at the beginning of each DTMF tone.

nFadeOutMs

Duration of the fade-out at the end of each DTMF tone expressed in milliseconds. Set this value to 0 if you don't need to apply a fade-out at the end of each DTMF tone.

fAmplitude

Amplitude of DTMF tones.

- value 0.0 means that DTMF tones are muted

- values higher than 0.0 and lower than 1.0 attenuate DTMF tones

- value 1.0 sets DTMF tones at full volume

- values higher than 1.0 amplify DTMF tones

 

 

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.