Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Tracks -property in MediaPlayer -object ?

Posted on 1998-02-16
2
Medium Priority
?
265 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 200 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

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

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…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

824 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