BASS.NET API for the Un4seen BASS Audio Library

BassCdBASS_CD_GetIDText Method

BASS.NET API for the Un4seen BASS Audio Library
Retrieves CD-Text identification info from the CD in a drive (BASS_CDID_TEXT).

Namespace:  Un4seen.Bass.AddOn.Cd
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static string[] BASS_CD_GetIDText(
	int drive
)

Parameters

drive
Type: SystemInt32
The drive... 0 = the first drive.

Return Value

Type: String
If an error occurs, is returned, use BASS_ErrorGetCode to get the error code. If successful, a string array of all CD-Text tags is returned.

CD-TEXT tags:

When requesting CD-TEXT, the tags are returned in the form of "tag=text". The following is a list of all the possible tags. Where <t> is shown, that represents the track number, with "0" being the whole disc/album. For example, "TITLE0" is the album title, while "TITLE1" is the title of the first track.

TITLE<t>The track (or album) title.
PERFORMER<t>The performer(s), artist(s).
SONGWRITER<t>The song writer(s).
COMPOSER<t>The composer(s).
ARRANGER<t>The arranger(s).
MESSAGE<t>Message.
GENRE<t>Genre.
ISRC<t>International Standard Recording Code (ISRC) of the track... <t> is never 0.
UPCUPC/EAN code of the album.
DISCIDDisc identification information.
Remarks

The returned identification string will remain in memory until the next call to this function, when it'll be overwritten by the next result. If you need to keep the contents of an identification string, then you should copy it before calling this function again.

ERROR CODEDescription
BASS_ERROR_DEVICEdrive is invalid.
BASS_ERROR_NOCDThere's no CD in the drive.
BASS_ERROR_ILLPARAMdrive is invalid.
BASS_ERROR_NOTAVAILThe CD does not have a UPC, ISRC or CD-TEXT info.
BASS_ERROR_UNKNOWNSome other mystery problem!

Examples

List all CD-Text tags of your first drive:
string[] cdText = BASS_CD_GetIDText(0);
if (cdText != null)
{
  foreach (string tag in cdText)
    Console.Writeln( tag );
}
See Also

Reference