Solved

get title from cdaudio

Posted on 2000-02-23
6
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

717 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