Copyright © 2005-2018 MultiMedia Soft

Effects.PreAmplifierValueGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the current pre-amplifier's amplification value. The current value can be modified through the Effects.PreAmplifierSetValue method.

Pre-amplification is applied only if enabled through a previous call to the Effects.PreAmplifierEnable method.

 

See the How to apply special effects to a playing sound section for further details.

 

 

Syntax

 

[Visual Basic]

Public Function PreAmplifierValueGet (

nPlayerIndex as Int16,

ByRef fValue as Single,

nScaleType as enumVolumeScales

) as enumErrorCodes


 

[C#]

public enumErrorCodes PreAmplifierValueGet (

Int16 nPlayerIndex,

ref float fValue,

enumVolumeScales nScaleType

);


 

[C++]

public: enumErrorCodes PreAmplifierValueGet (

Int16 nPlayerIndex,

float __gc *fValue,

enumVolumeScales nScaleType

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

fValue

Reference that, on return from the method call, will contain the amplification value expressed in the unit specified by the nScaleType parameter.

nScaleType

The amplification scaling type.

Supported values are the following:

Mnemonic constant

Value

Meaning

SCALE_LINEAR

0

Returned amplification, expressed in percentage, is based upon a linear scale:

- value 0.0 mutes the playing sound

- values higher than 0.0 and smaller than 100.0 attenuate the playing sound

- value 100.0 keeps sound level unchanged

- values higher than 100.0 amplify the playing sound

SCALE_LOG

1

Returned amplification, expressed in dB, is based upon a logarithmic scale:

- value -100.0 mutes the playing sound

- values higher than -100.0 and smaller than 0.0 attenuate the playing sound

- value 0.0 keeps sound level unchanged

- values higher than 0.0 amplify the playing sound

 

The actual applied formula for converting a linear volume into a logarithmic volume is the following:

VolumeInDB = 20 * log10 (VolumeLinear/100)

The C syntax for converting a logarithmic volume into a linear volume is the following:

VolumeLinear = 100 * pow (10, VolumeInDB/20);

 

 

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.