SoundGenerator.StreamCreateDtmfString method |
|
Remarks
Creates a DTMF (Dual Tone Multi Frequency) tones audio stream and loads it inside the given player.
Once created, the audio stream can be played through the PlaySound method, paused through the PauseSound method and stopped through the StopSound method. Once no more needed, the audio stream can be discarded from memory through the CloseSound method.
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.StreamCreateDtmfString ( nPlayer as Integer, nSampleRate as Long, bMono as enumBoolean, strDtmf as String, nToneDurationMs as Long, nSilenceDurationMs as Long, nFadeInMs as Long, nFadeOutMs as Long, fAmplitude as Single ) as enumErrorCodes |
[C++] short control.SoundGenerator.StreamCreateDtmfString ( short nPlayer, long nSampleRate, short bMono, LPCTSTR strDtmf, long nToneDurationMs, long nSilenceDurationMs, long nFadeInMs, long nFadeOutMs, float fAmplitude ); |
Parameter |
Description |
||||||
|
|
||||||
nPlayer |
Number representing the zero-based index of the involved player |
||||||
nSampleRate |
Sample rate of the stream, e.g. 44100 |
||||||
bMono |
Boolean value specifying if the audio stream is in mono or stereo. Supported values are the following:
|
||||||
strDtmf |
String containing DTMF characters that will dial the phone number |
||||||
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 smaller 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 get the error code |
enumErrorCodes.ERR_NOERROR (0) |
The method call was successful |