Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

get title from cdaudio

Posted on 2000-02-23
6
Medium Priority
?
185 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 450 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Independent Software Vendors: 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 trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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.
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…
Suggested Courses

610 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