Copyright © 2001-2019 MultiMedia Soft

PlayListGetItemStringUnicode method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains a Unicode string containing information about the given playlist song.

 

Strings are only available if the playlist has not been loaded using "speed mode" (see the nMode parameter of the PlayListLoad method for details). Some string (see table below) is available only when the song is loaded and ready for playing.

 

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

 

 

Syntax

 

[Visual Basic]

control.PlayListGetItemStringUnicode (

nPlayer as Integer,

nItem as Integer,

nString as enumPlayListFieldsForDj

) as String


 

[C++]

short control.PlayListGetItemStringUnicode (

short nPlayer,

short nItem,

short nString

);


 

 

Parameter

Description

 

 

nPlayer

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

nItem

Number representing the zero-based index of the song (item) whose information must be obtained. The number of available items can be obtained using the PlayListGetCount method.

nString

The identifier of the string to obtain.

Supported values are the following:

Mnemonic constant

Value

Meaning

PL_STRING_URL

0

Full pathname of the song file

PL_STRING_FILENAME

1

Song filename

PL_STRING_INFO_FRAMES

2

Number of frames inside the song (MP3 only)  (available only when the song is loaded)

PL_STRING_INFO_DURATION

3

Duration of the song in seconds

This information is not available when the playlist is loaded with the PLAYLIST_SPEED_MODE setting and for video clips.

PL_STRING_INFO_LEVEL

4

MPEG level (MP3 only)  (available only when the song is loaded)

PL_STRING_INFO_LAYER

5

MPEG layer (MP3 only)  (available only when the song is loaded)

PL_STRING_INFO_BITRATE

6

Bitrate (available only when the song is loaded)

PL_STRING_INFO_FREQ

7

Sampling frequency (available only when the song is loaded)

PL_STRING_INFO_MODE

8

MPEG mode (MP3 only)  (available only when the song is loaded)

PL_STRING_INFO_CHANNELS

9

Number of channels (1 for mono, 2 for stereo)  (available only when the song is loaded)

PL_STRING_INFO_TITLE

10

Title of the song contained in the ID3V1 tag (MP3 only).

In case the loaded sound file shouldn't be in MP3 format or should not contain the ID3V1 tag, the following possibilities would apply:

if the sound file should have been loaded from a playlist in PLS format, the returned string would contain contents of the "TitleX" field corresponding to the item (same as requesting PL_STRING_INFO_TITLE_PLS)
if the sound file should have been loaded from a playlist in PDJ format, the returned string would contain contents of the "Title" attribute corresponding to the item
in all other cases the returned string would contain the filename of the sound file (same as requesting PL_STRING_FILENAME)

PL_STRING_INFO_ARTIST

11

Artist (contained in the ID3V1 tag) (MP3 only)

PL_STRING_INFO_ALBUM

12

Album (contained in the ID3V1 tag) (MP3 only)

PL_STRING_INFO_YEAR

13

Year (contained in the ID3V1 tag) (MP3 only)

PL_STRING_INFO_COMMENT

14

Comment (contained in the ID3V1 tag) (MP3 only)

PL_STRING_INFO_TRACK

15

Track number (contained in the ID3V1.1 tag) (MP3 only)

PL_STRING_INFO_GENRECODE

16

Genre code (contained in the ID3V1 tag, see Appendix A for supported values)  (MP3 only)

PL_STRING_INFO_GENRE_STR

17

Genre description (based upon the genre code contained in the ID3V1 tag, see Appendix A for supported values) (MP3 only)

PL_STRING_INFO_FORMATTED_DURAT

18

Formatted sound duration using the following format [hh:mm:ss:ms]. For example [04:34:200] indicates a song during 0 hours (the hours number is automatically omitted if 0), 4 minutes, 34 seconds and 200 milliseconds.

This information is not available when the playlist is loaded with the PLAYLIST_SPEED_MODE setting and for video clips.

PL_STRING_INFO_FORMATTED_DURAT_NO_MS

19

Formatted sound duration, without milliseconds, using the following format [hh:mm:ss]. Also in this case the hours number is automatically omitted if 0.

This information is not available when the playlist is loaded with the PLAYLIST_SPEED_MODE setting and for video clips.

PL_STRING_INFO_TITLE_PLS

20

If the sound file should have been loaded from a playlist in PLS format, contents of the "TitleX" field corresponding to the item

PL_STRING_INFO_LENGTH_PLS

21

If the sound file should have been loaded from a playlist in PLS format, contents of the "LengthX" field corresponding to the item

 

Return value

 

Value

Meaning

 

 

Empty string

The information was not available or an error occurred (see the LastError property for further error details)

Valid string

The requested string