Solved

get title from cdaudio

Posted on 2000-02-23
6
178 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now