Copyright © 2001-2019 MultiMedia Soft

PlayListSaveAutomation method

Previous pageReturn to chapter overviewNext page

Remarks

 

Saves the current playlist into the given file in PDJ format using given position unit and volume scale.

 

A playlist can be saved with volume automation information only if it has been loaded through the PlayListLoad or PlayListLoadSync methods having the nMode parameter set to PLAYLIST_AUTOMATION_MODE or if it has been created at runtime using the PlayListCreateAutomation method.

 

For further details about playlists management see the How to create and manage a playlist tutorial.

For details about using Volume Automation refer to the How to manage Volume Automation tutorial.

 

 

Syntax

 

[Visual Basic]

control.PlayListSaveAutomation (

nPlayer as Integer,

strPathname as String,

nPosUnit as enumVolumeAutomationPositionUnits

nScaleType as enumVolumeScales

) as enumErrorCodes


 

[C++]

short control.PlayListSaveAutomation (

short nPlayer,

LPCTSTR strPathname,

short nPosUnit,

short nScaleType

);


 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the player that will own the new playlist

strPathname

String containing the name of the output playlist file (PDJ format)

nPosUnit

The unit used to define positions of volume points.

Supported values are the following:

Mnemonic constant

Value

Meaning

VA_POS_UNIT_SECONDS

0

Positions are expressed in seconds

VA_POS_UNIT_PERCENTAGE

1

Positions are expressed in percentage

VA_POS_UNIT_MILLISECONDS

2

Positions are expressed in milliseconds

nScaleType

Volume scale type.

Supported values are the following:

Mnemonic constant

Value

Meaning

SCALE_LINEAR

0

Volume, expressed in percentage, is based upon a linear scale:

- value 0.0 means that channel is muted

- values higher than 0.0 and smaller than 100.0 attenuate the channel volume

- value 100.0 keeps original sound level unchanged

- values higher than 100.0 amplify the sound level

SCALE_LOG

1

Volume, expressed in dB, is based upon a logarithmic scale:

- value -100.0 means that channel is muted

- values higher than -100.0 and smaller than 0.0 attenuate the channel volume

- value 0.0 keeps original sound level unchanged

- values higher than 0.0 amplify the sound level

 

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 call was successful.