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

Public Function StreamElementAmplitudeGet (

nPlayerIndex as Int16,

nUniqueId as Int32,

ByRef fAmplitude as Single

) as enumErrorCodes


 

[C#]

public enumErrorCodes StreamElementAmplitudeGet (

Int16 nPlayerIndex,

Int32 nUniqueId,

ref float fAmplitude

);


 

[C++]

public: enumErrorCodes StreamElementAmplitudeGet (

Int16 nPlayerIndex,

Int32 nUniqueId,

float __gc *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

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

enumErrorCodes.NOERROR (0)

The method call was successful.