Tracks -property in MediaPlayer -object ?

Posted on 1998-02-16
Last Modified: 2010-04-04
Hi !

D2 help shows this exampel code to skips to the beginning of the last track on a CD audio device.


with MediaPlayer1 do
if DeviceType = dtCDAudio then
  for I := 1 to Tracks-1 do

>gives types don't fit -message?

1. How do you perform a simple task (by RadioGroupBox) to
go to the beginning of certain track and to the beginning of
certain track position (say at 2 min. 30 sec. on same track)

Many thanks for bothering you!
Question by:GISEXP
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

Accepted Solution

inter earned 50 total points
ID: 1359322
With the following you can seek to any (Trac, Minute, Second)
But besure to add the MMSystem to you USES clause:

procedure SeekToTrack(M : TMediaPlayer; Trac, Minute, Second: Byte);
 with M do
 if DeviceType = dtCDAudio then
   // we set the time to Track Minute Second Frame Format
   TimeFormat := tfTMSF;
   // This macro makes up a position from vars Frame is 0
   // for CDs
   Position := mci_Make_TMSF(Trac, Minute, Second,0);


Author Comment

ID: 1359323
Thanks Igor!

This will do at the moment, I'll try to proceed in making the
UI for my birdsong CDs.

best regards.

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

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