Browse Source

* Some explanatory comments from Andrew Haines (bug ID 27898)

git-svn-id: trunk@30652 -
michael 10 years ago
parent
commit
81950878b9
1 changed files with 11 additions and 0 deletions
  1. 11 0
      packages/cdrom/src/cdrom.pp

+ 11 - 0
packages/cdrom/src/cdrom.pp

@@ -20,12 +20,23 @@ unit cdrom;
 interface
 interface
 
 
 Type
 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
   TTocEntry = Record
     min, sec, frame : Integer;
     min, sec, frame : Integer;
   end;
   end;
   PTocEntry = ^TTocEntry;
   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;
 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;
 Function GetCDRomDevices(Var Devices : Array of string) : Integer;
 
 
 Implementation
 Implementation