Copyright © 2011-2023 MultiMedia Soft

SoundComposer.ItemDtmfStringAdd method

Previous pageReturn to chapter overviewNext page

Remarks

 

Adds a DTMF (Dual Tone Multi Frequency) tones generator element to the audio stream previously created through the SoundComposer.SessionInit method.

 

For further details about sound composing see the the SoundComposerMan class and the How to compose a sound tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ItemDtmfStringAdd (

strFriendlyName as String,

nChannel as Int16,

strDtmf as String,

nToneDurationMs as Int32,

nSilenceDurationMs as Int32,

nFadeInMs as Int32,

nFadeOutMs as Int32,

fAmplitude as Single,

nOffsetMs as Int32,

ByRef nUniqueId as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes ItemDtmfStringAdd (

string strFriendlyName,

Int16 nChannel,

string strDtmf,

Int32 nToneDurationMs,

Int32 nSilenceDurationMs,

Int32 nFadeInMs,

Int32 nFadeOutMs,

float fAmplitude,

Int32 nOffsetMs,

ref Int32 nUniqueId

);


 

[C++]

public: enumErrorCodes ItemDtmfStringAdd (

string strFriendlyName,

Int16 nChannel,

string strDtmf,

Int32 nToneDurationMs,

Int32 nSilenceDurationMs,

Int32 nFadeInMs,

Int32 nFadeOutMs,

float fAmplitude,

Int32 nOffsetMs,

Int32 __gc  *nUniqueId

);


 

Parameter

Description

 

 

strFriendlyName

Friendly name of the item

nChannel

Channel of the audio stream that will reproduce the item: can be a value between 0 and the number of channels of the audio stream created through the SoundComposer.SessionInit method.

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 lower than 1.0 attenuate DTMF tones

- value 1.0 sets DTMF tones at full volume

- values higher than 1.0 amplify DTMF tones

nOffsetMs

Offset of the DTMF tones, expressed in milliseconds, respect to the beginning of the audio stream.

nUniqueId

Reference to a value that, on return from the method call, will contain the unique identifier of the newly added element: this unique identifier will be used in order to invoke further methods related to the use of this specific element:

- SoundComposer.ItemDtmfStringGet to obtain current settings of the DTMF string

- SoundComposer.ItemDtmfStringSet to modify settings of the DTMF string

- SoundComposer.ItemAmplitudeGet to obtain the amplitude of the item

- SoundComposer.ItemAmplitudeSet to modify the amplitude of the item

- SoundComposer.ItemChannelGet to obtain the channel of of the audio stream that will reproduce the item

- SoundComposer.ItemChannelSet to modify the channel of of the audio stream that will reproduce the item

- SoundComposer.ItemRemove to remove the item from the sound composition

- SoundComposer.ItemDurationGet to obtain the duration, expressed in milliseconds, of the item

- SoundComposer.ItemOffsetGet to obtain the offset, expressed in milliseconds, of the item respect to the beginning of the audio stream

- SoundComposer.ItemOffsetSet to modify the offset, expressed in milliseconds, of the item respect to the beginning of the audio stream

- SoundComposer.ItemTypeGet to obtain the item's type

- SoundComposer.ItemFriendlyNameGet to obtain the friendly name of the item

- SoundComposer.ItemFriendlyNameSet to modify the friendly name of the item

 

The usage of the SoundComposer.ItemDurationSet method is not supported on DTMF strings because the duration of the item strictly depends upon the number of characters inside the string itself and upon the duration of each single tone and of the silence between tones so, in order to modify the duration of a DTMF string, you need to use the SoundComposer.ItemDtmfStringSet method..

 

 

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.