Solved

Tracks -property in MediaPlayer -object ?

Posted on 1998-02-16
2
234 Views
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.

var
I:integer;

begin
with MediaPlayer1 do
if DeviceType = dtCDAudio then
begin
  Seek(TrackPosition[1]);
  for I := 1 to Tracks-1 do
    Next;
end;

>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!
0
Comment
Question by:GISEXP
2 Comments
 
LVL 5

Accepted Solution

by:
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);
begin
 with M do
 if DeviceType = dtCDAudio then
 begin
   // 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);
 end;
end;

Igor
0
 

Author Comment

by:GISEXP
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.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

17 Experts available now in Live!

Get 1:1 Help Now