Copyright © 2001-2018 MultiMedia Soft

SoundGenerator.StreamElementAmplitudeSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Modifies the amplitude of the sound element identified by a specific unique identifier. The current amplitude of a sound element can be obtained through the SoundGenerator.StreamElementAmplitudeGet 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.StreamElementAmplitudeSet (

nPlayer as Integer,

nUniqueId as Long,

fAmplitude as Single

) as enumErrorCodes


 

[C++]

short control.SoundGenerator.StreamElementAmplitudeSet (

short nPlayer,

long nUniqueId,

float fAmplitude

);


 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nUniqueId

The unique identifier of the element previously returned by one of the following calls:

- SoundGenerator.StreamChannelAddTone

- SoundGenerator.StreamChannelAddNoise

- SoundGenerator.StreamChannelAddDtmfString

- SoundGenerator.StreamChannelAddSlidingTone

- SoundGenerator.StreamChannelAddSpeechFromFile

- SoundGenerator.StreamChannelAddSpeechFromString

- SoundGenerator.StreamChannelElementUniqueIdGet

fAmplitude

Amplitude of the sound element.

- value 0.0 means that the sound element is muted

- values higher than 0.0 and smaller than 1.0 attenuate the sound element

- value 1.0 sets the sound element at full volume

- values higher than 1.0 amplify the sound element

 

 

 

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