Copyright © 2001-2019 MultiMedia Soft

SoundGenerator.StreamElementAmplitudeGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

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

nPlayer as Integer,

nUniqueId as Long,

ByRef fAmplitude as Single

) as enumErrorCodes


 

[C++]

short control.SoundGenerator.StreamElementAmplitudeGet (

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

Reference to a value that, on return from the method call, will contain the amplitude of the element.

- value 0.0 means that the element is muted

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

- value 1.0 sets the element at full volume

- values higher than 1.0 amplify the 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