From 81950878b9e069715b1b2ae7a2507d48679538f2 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 18 Apr 2015 16:34:01 +0000 Subject: [PATCH] * Some explanatory comments from Andrew Haines (bug ID 27898) git-svn-id: trunk@30652 - --- packages/cdrom/src/cdrom.pp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/cdrom/src/cdrom.pp b/packages/cdrom/src/cdrom.pp index 03bc62144e..29bf4acccc 100644 --- a/packages/cdrom/src/cdrom.pp +++ b/packages/cdrom/src/cdrom.pp @@ -20,12 +20,23 @@ unit cdrom; interface Type + // Frames are 1/75th of a second. + // To get the seconds of a track divide the frames by 75. + // TrackLen: Double; ... + // TrackLen := Frames / 75. TTocEntry = Record min, sec, frame : Integer; end; PTocEntry = ^TTocEntry; +// Returns the High value to use in a loop. Each entry is the position of the end +// of a track. For audio cd's the zero'th entry is not audio data. If an audio cd +// has 10 songs then ReadCDToc will return 10 but there are 11 entries: 0..10. +// You still need to use the zero'th entry to get the first track length: +// Track1Length := TOC[1].frames = TOC[0].frames. Function ReadCDTOC(Device : String; Var CDTOC : Array of TTocEntry) : Integer; + +// Returns the number of devices placed in 'Devices' Function GetCDRomDevices(Var Devices : Array of string) : Integer; Implementation