Copyright © 2001-2019 MultiMedia Soft

StreamVolumeLevelGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Retrieves the current volume for the given player. The volume can be changed through the StreamVolumeLevelSet method.

 

 

Syntax

 

[Visual Basic]

control.StreamVolumeLevelGet (

nPlayer as Integer,

fValue as Single,

nScaleType as enumVolumeScales

) as enumErrorCodes


 

[C++]

short control.StreamVolumeLevelGet (

short nPlayer,

float *fValue,

short nScaleType

);


 

 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

fValue

Reference that, on return from the method call, will contain the current volume (the meaning of the value depends upon the nScaleType parameter).

nScaleType

The volume scaling type.

Supported values are the following:

Mnemonic constant

Value

Meaning

SCALE_LINEAR

0

The returned volume is based upon a linear scale and can be in the range from 0.0 (silence) to 100.0 (max volume)

SCALE_LOG

1

The returned volume, expressed in dB, is based upon a logarithmic scale and can be in the range from -100  (silence) to 0 (max volume)

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.ERR_NOERROR (0)

The volume has been changed correctly