Retrieves the TOC from the CD in a drive.
Namespace: Un4seen.Bass.AddOn.Cd
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- drive
- Type: SystemInt32
The drive to get info on... 0 = the first drive. - mode
- Type: Un4seen.Bass.AddOn.CdBASSCDTOCMode
Optionally, the following (see BASSCDTOCMode):BASS_CD_TOC_LBA Get the track start address in LBA form. BASS_CD_TOC_TIME Get the track start address in time form. BASS_CD_TOC_INDEX +track number (0=first)i> Get the position of a track's indexes.
Return Value
Type: BASS_CD_TOCIf successful, an instance of the BASS_CD_TOC class is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_DEVICE | drive is not valid. |
BASS_ERROR_NOCD | There's no CD in the drive. |
Examples
BASS_CD_TOC toc = BassCd.BASS_CD_GetTOC(0, BASSCDTOCMode.BASS_CD_TOC_TIME); if (toc != null) { Console.WriteLine(toc.ToString()); // list the TOC_TRACKs foreach (BASS_CD_TOC_TRACK track in toc.tracks) { Console.WriteLine(track.ToString()); } }
See Also