Solved

get title from cdaudio

Posted on 2000-02-23
6
177 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

758 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

21 Experts available now in Live!

Get 1:1 Help Now