Solved

get title from cdaudio

Posted on 2000-02-23
6
180 Views
Last Modified: 2010-05-02
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?
0
Comment
Question by:poorboy
6 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 2553256
0
 
LVL 3

Accepted Solution

by:
paulstamp earned 150 total points
ID: 2553559
bruintie's answer is only of any use if you're using winamp - not if you're writing your own CD player. The sad truth is there is no way to get the title without either creating your own playlist (the easiest thing) or by connecting to something like CDDB on the web. Winamp cant get at the track names automatically.

If you want to create your own playlist you can identify the CD Serial Number using the GetVolumeInformation API - an example of this is on :

www.mvps.org/vbnet/code/shell/volumelabel.htm

Then prompt the user for track names and store against the CD Serial Number

Hope this helps
0
 

Expert Comment

by:Cloudjin
ID: 2553579
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.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 3

Expert Comment

by:paulstamp
ID: 2553591
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.
0
 

Expert Comment

by:Cloudjin
ID: 2554982
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 :)
0
 

Author Comment

by:poorboy
ID: 2556468
Thanks to all for your help. I'll try to use the CD Serial Number to create a playlist.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question