Copyright © 2005-2018 MultiMedia Soft

SoundGenerator.StreamElementAmplitudeSet method

Previous pageReturn to chapter overviewNext page



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.





[Visual Basic]

Public Function StreamElementAmplitudeSet (

nPlayerIndex as Int16,

nUniqueId as Int32,

fAmplitude as Single

) as enumErrorCodes



public enumErrorCodes StreamElementAmplitudeSet (

Int16 nPlayerIndex,

Int32 nUniqueId,

float fAmplitude




public: enumErrorCodes StreamElementAmplitudeSet (

Int16 nPlayerIndex,

Int32 nUniqueId,

float fAmplitude








Number representing the zero-based index of the involved player


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


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






Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.