Solved

Tracks -property in MediaPlayer -object ?

Posted on 1998-02-16
2
238 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 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