BASS.NET API for the Un4seen BASS Audio LibraryBassCdBASS_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:

public static string[] BASS_CD_GetIDText(
	int 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).
ISRC<t>International Standard Recording Code (ISRC) of the track... <t> is never 0.
UPCUPC/EAN code of the album.
DISCIDDisc identification information.

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!


List all CD-Text tags of your first drive:
Dim cdText As String() = BASS_CD_GetIDText(0)
If Not (cdText Is Nothing) Then
  Dim tag As String
  For Each tag In cdText
  Next tag
End If
string[] cdText = BASS_CD_GetIDText(0);
if (cdText != null)
  foreach (string tag in cdText)
    Console.Writeln( tag );
See Also