Cd player number of tracks

Posted on 1998-04-10
Medium Priority
Last Modified: 2010-04-06
I wish to know how to display the number of tracks on a cd and the total time for each of those tracks.
This question has been bothering me for weeks.
Question by:cando
  • 2

Expert Comment

ID: 1361365
Hi cando

simply use the TMediaPlayer.tracks property to get the number of tracks and the TMediaPlayer.TrackLength(NumberOfTrack) property to get the length of a track

hope this helps


Expert Comment

ID: 1361366
why dont u try http://www.swiftsoft.de/mmtools.html...
i assure u more than ur points it will help u a lot......

Author Comment

ID: 1361367
I know about the MediaPlayer.tracks and tracklength, I haven't been able to get those to work, If some one could give me an example it would be very helpfull.

Accepted Solution

rene100 earned 200 total points
ID: 1361368
hi cando

you have first to select the type of device you wants to use, in your case set the mediaplayer.devicetype to dtCDAudio (or you can try dtAutoSelect, but I had problems with that)
then you can either set the AutoOpen property to true or open the device with MediaPlayer.open, i.e. in the formCreate event.
you now should be able to get the tracks/tracklength with the solution above.
remember to close the device with MediaPlayer.close when you terminate the program


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.

624 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