Copyright © 2005-2019 MultiMedia Soft

Effects.PreAmplifierSpeakerValueSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Modifies the preamplifier's amplification value related to a specific speaker (only for multi-channel songs like 5.1 or 7.1). The current value can be obtained through the Effects.PreAmplifierGetSpeakerValue 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 PreAmplifierSpeakerValueSet (

nPlayerIndex as Int16,

nSpeaker as enumSpeakers

fValue as Single,

nScaleType as enumVolumeScales

) as enumErrorCodes


 

[C#]

public enumErrorCodes PreAmplifierSpeakerValueSet (

Int16 nPlayerIndex,

enumSpeakers nSpeaker,

float fValue,

enumVolumeScales nScaleType

);


 

[C++]

public: enumErrorCodes PreAmplifierSpeakerValueSet (

Int16 nPlayerIndex,

enumSpeakers nSpeaker,

float fValue,

enumVolumeScales nScaleType

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nSpeaker

The output speaker assigned to the given player.

Supported values are the following:

Mnemonic value

Numeric value

Meaning

SPEAKER_FRONT

0

Front speakers (Stereo)

SPEAKER_REAR

1

Rear speakers (Stereo)

SPEAKER_CENTER_LFE

2

Center speakers (Stereo)

SPEAKER_REAR_CENTER

3

Rear center speakers (Stereo)

SPEAKER_FRONT_LEFT

4

Front-left speaker (Mono)

SPEAKER_FRONT_RIGHT

5

Front-right speaker (Mono)

SPEAKER_REAR_LEFT

6

Rear-left speaker (Mono)

SPEAKER_REAR_RIGHT

7

Rear-right speaker (Mono)

SPEAKER_CENTER

8

Center speaker (Mono)

SPEAKER_LFE

9

LFE or Subwoofer speaker (Mono)

SPEAKER_REAR_CENTER_LEFT

10

Rear Center Left speaker (Mono)

SPEAKER_REAR_CENTER_RIGHT

11

Rear Center Right speaker (Mono)

 

Below you can see the positioning of the Stereo speakers on a wide 7.1 configuration (the reported blue numbers corresponds to the Numeric value of the parameter)

adjstudnet_i00006c

and below you can see the positioning of the Mono speakers on the same wide 7.1 configuration

 

adjstudnet_i00006d

fValue

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

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

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.