Copyright © 2005-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]

Public Function StreamElementAmplitudeSet (

nPlayerIndex as Int16,

nUniqueId as Int32,

fAmplitude as Single

) as enumErrorCodes


 

[C#]

public enumErrorCodes StreamElementAmplitudeSet (

Int16 nPlayerIndex,

Int32 nUniqueId,

float fAmplitude

);


 

[C++]

public: enumErrorCodes StreamElementAmplitudeSet (

Int16 nPlayerIndex,

Int32 nUniqueId,

float fAmplitude

);


 

Parameter

Description

 

 

nPlayerIndex

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 (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.