Copyright © 2005-2018 MultiMedia Soft

PlayListAddItemWithTag method

Previous pageReturn to chapter overviewNext page

Remarks

 

Adds a song with an associated custom tag string to the loaded playlist. When the container application is notified through the CallbackForPlayersEvents delegate having the nEvent parameter set to EV_PLAYLIST_SOUND_LOADED, the custom tag string is passed inside the pBufferUnicode parameter.

 

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]

Public Function PlayListAddItemWithTag (

nPlayerIndex as Int16,

strPathname as string,

nIndex as Int16,

strTag as String

) as enumErrorCodes


 

[C#]

public enumErrorCodes PlayListAddItemWithTag (

Int16 nPlayerIndex,

string strPathname,

Int16 nIndex,

string strTag

);


 

[C++]

public: enumErrorCodes PlayListAddItemWithTag (

Int16 nPlayerIndex,

string strPathname,

Int16 nIndex,

string strTag

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the player that owns the playlist

strPathname

String containing the pathname of the element to add.

 

If the playlist has been loaded or created with volume automation enabled, you can add a new item containing all the needed mixing positions, volume automation points and cue points in one single shot by passing a well formatted XML string to this parameter; an example of well formatted string is the following:

 

 <Item pathname="C:\sounds\drumtrik01_120bpm.wav" DurationSec="16.00" StartPosSec="2.0" MixPosSec="12.0" EndPosSec="16.0" >

   <VolumePoints>

     <VolumePoint name="start fade-in" VolumeLevelLinear="0.0" PosSec="2.0" CurveType="5"

                LeftX="11" LeftY="3" RightX="93" RightY="43" />

     <VolumePoint name="end fade-in" VolumeLevelLinear="100.0" PosSec="5.5" CurveType="0" />

     <VolumePoint name="start fade-out" VolumeLevelLinear="100.0" PosSec="11.9" CurveType="5"

                LeftX="83" LeftY="13" RightX="32" RightY="41" />

     <VolumePoint name="end fade-out" VolumeLevelLinear="0.0" PosSec="15.9" CurveType="0" />

   </VolumePoints>

   <CuePoints>

     <CuePoint name="Silence end" PosMs="1000" />

     <CuePoint name="Fading point" PosMs="12000" />

     <CuePoint name="Silence start" PosMs="15900" />

   </CuePoints>

 </Item>

 

For details about XML syntax of the string above refer to the How to manage Volume Automation tutorial.

 

If the playlist has been loaded or created without volume automation enabled, you can add a new encrypted item by passing a well formatted XML string to this parameter; an example of well formatted string is the following:

 

 <Item pathname="C:\sounds\drumtrik01_120bpm.wav" DecryptKey="JHDG78TR45JHGaf654MAAKHNF235TY" />

 

nIndex

Number representing the zero-based insertion position: if the nIndex parameter value exceed the playlist length, the song will be placed at the bottom of the playlist

strTag

String containing a custom tag

 

 

 

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.