poorboy
asked on
get title from cdaudio
Using VB5, is there a way to get the title of the current song being played on a audio cd? I have made a cd player and i would like to add this feature to it. Can this be done or do i have to make a play list?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There are two ways to get this information.
1. If the information is already stored in the cdplayer.ini file.
Read the *.cda files on the CD, and retrieve the CD id from bytes 25->28. This CD id will match the cdplayer.ini section name. Here you will find the title, artist, etc..
2. If the information is not available on your machine, you'll need to use CDDB to retrieve the information. Look at http://www.cddb.com for information and samples.
And to clearify a point, CD titles are NOT stored on the CD's.
1. If the information is already stored in the cdplayer.ini file.
Read the *.cda files on the CD, and retrieve the CD id from bytes 25->28. This CD id will match the cdplayer.ini section name. Here you will find the title, artist, etc..
2. If the information is not available on your machine, you'll need to use CDDB to retrieve the information. Look at http://www.cddb.com for information and samples.
And to clearify a point, CD titles are NOT stored on the CD's.
The cdplayer.ini file can only return information the user has typed in... it will not retrieve the name of a track from a CD directly which I believe is what poorboy is asking.
A lot of programs store the CDDB information in the CDPlayer.ini file.
Hence, it can be used as a resource. (This was intended as an easy solution, as well as pointer to the files purpose).
However, the CDDB support will be the optimal solution. And considering that CDDB2 offers a COM-based API for windows platforms, it shouldn't be much problems to implement it :)
Full samples, and the ActiveX kit, are available at www.cddb.com. You'll need to sign an agreement first though :)
Hence, it can be used as a resource. (This was intended as an easy solution, as well as pointer to the files purpose).
However, the CDDB support will be the optimal solution. And considering that CDDB2 offers a COM-based API for windows platforms, it shouldn't be much problems to implement it :)
Full samples, and the ActiveX kit, are available at www.cddb.com. You'll need to sign an agreement first though :)
ASKER
Thanks to all for your help. I'll try to use the CD Serial Number to create a playlist.
you could try
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=6150
HTH:O)Bruintje