Namespace: Un4seen.Bass.AddOn.Cd
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Parameters
- drive
- Type: SystemInt32
The drive... 0 = the first drive. - id
- Type: Un4seen.Bass.AddOn.CdBASSCDId
The identification to retrieve, one of the following (see BASSCDId):BASS_CDID_UPC Returns the catalog number of the CD. The number uses UPC/EAN-code (BAR coding). This might not be available for all CDs. BASS_CDID_CDDB Produces a CDDB identifier. This can be used to get details on the CD's contents from a CDDB server. BASS_CDID_CDDB_QUERY Sends a "query" command to the configured CDDB server (see BASS_CONFIG_CD_CDDB_SERVER) to get a list of matching entries for the CD's CDDB identifier. The contents of each entry can be retrieved via the BASS_CDID_CDDB_READ option. BASS_CDID_CDDB_READ + entry Sends a "read" command to the configured CDDB server (see BASS_CONFIG_CD_CDDB_SERVER) to get a database entry for the CD's CDDB identifier... 0 = first entry. BASS_CDID_CDDB_READ_CACHE Returns the cached CDDB "read" command response, if there is one. BASS_CDID_CDDB2 Produces a CDDB2 identifier. This can be used to get details on the CD's contents from a CDDB2 server. BASS_CDID_CDPLAYER Produces an identifier that can be used to lookup CD details in the CDPLAYER.INI file, located in the Windows directory. BASS_CDID_MUSICBRAINZ Produces an identifier that can be used to get details on the CD's contents from MusicBrainz. BASS_CDID_ISRC + track Returns the International Standard Recording Code of the track... 0 = first track. This might not be available for all CDs. Use BASS_CD_GetISRC(Int32, Int32) for a more convenient way to read the ISRC.
Return Value
Type: StringIf an error occurs, is returned, use BASS_ErrorGetCode to get the error code. If successful, the identication info is returned.
BASS_CDID_TEXT is not supported with this overload (see BASS_CD_GetIDText(Int32)).
The returned identification string will remain in memory until the next call to this function, when it will be overwritten by the next result. If you need to keep the contents of an identification string, you should copy it before calling this function again. Exceptions to that are BASS_CDID_CDDB_QUERY and BASS_CDID_CDDB_READ responses, which are cached separately per-drive. A BASS_CDID_CDDB_QUERY response remains cached while the same CD is in the drive, and a BASS_CDID_CDDB_READ response is cached until a different database entry is requested. The CDDB caches are also cleared whenever the CDDB server is changed via the BASS_CONFIG_CD_CDDB_SERVER config option.
When requesting CDDB identification, the string returned is what should be used in a CDDB query. The command sent to the CDDB server would be "cddb query <the returned string>". If successful, that results in a list of matching CDs, which the contents of can be requested using the "cddb read" command. That is what the BASS_CDID_CDDB_QUERY and BASS_CDID_CDDB_READ options do. See www.cddb.com and www.freedb.org for more information on using a CDDB server.
When requesting MUSICBRAINZ see www.musicbrainz.org for details.
ERROR CODE | Description |
---|---|
BASS_ERROR_DEVICE | drive is invalid. |
BASS_ERROR_NOCD | There's no CD in the drive. |
BASS_ERROR_ILLPARAM | id is invalid. |
BASS_ERROR_NOTAVAIL | The CD does not have a UPC, ISRC or CD-TEXT info, or the BASS_CDID_CDDB_READ entry number is not valid. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |