Copyright © 2001-2011 MultiMedia Soft

NormalizationEnable method

Previous pageReturn to chapter overviewNext page

Remarks

 

Enables/disables real-time normalization of songs during playback. For obtaining good results, in order to apply normalization the control will perform detection of the highest peak during the loading phase (started through the LoadSound or LoadSoundFromMemory methods) so it will need to read the overall sound file: for this reason, when normalization is enabled, it's highly recommended that you avoid loading files stored inside a network disk.

 

Normalization is not supported in the following cases:

 

Internet streams loaded through the LoadInternetStream method
audio files loaded through the LoadSoundFast method
video clips loaded through DirectShow
on the output of a stream mixer

 

When normalization is enabled on any of the players instanced by the control, eventual custom DSPs must be set to work with floating point samples through the CustomDSP.UseFloatSamples method.

 

 

Syntax

 

[Visual Basic]

control.NormalizationEnable (

nPlayer as Integer,

bEnable as enumBoolean,

fTargetLevelPerc as Single,

fBelowLevelPerc as Single,

fAboveLevelPerc as Single

) as enumErrorCodes


 

[C++]

short control.NormalizationEnable (

short nPlayer,

short bEnable,

float fTargetLevelPerc,

float fBelowLevelPerc,

float fAboveLevelPerc

);


 

 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

bEnable

Boolean value that specifies if normalization must be enabled or disabled.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Disabled normalization

BOOL_TRUE

1

Enables normalization

fTargetLevelPerc

Target peak level expressed in percentage.Typical values are 98% (-0.17 dB) or 100% (0 dB).

fBelowLevelPerc

Defines the lower peak level value, expressed in percentage, of the range where normalization effect will not be applied. Set this value to 100 if you want to apply normalization on all peak levels.

fAboveLevelPerc

Defines the higher peak level value, expressed in percentage, of the range where normalization effect will not be applied.  Set this value to 100 if you want to apply normalization on all peak levels.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The call was successful.