Description ----------- This component lets hear music from your CD ROM drive just calling simple functions like Play, Stop, Pause, Next, and so on. Using this component you will be able to add a CD player to any delphi program. (c) Xavier Cirac. All rights reserved mail: Register -------- Why should I register this component? First of all, this component is shareware, so if after you have tried it, you like it or you are going to use it, you have to register it. Otherwise you will be violating the copyright laws. Besides, you should think that this component has been developed by a Delphi programmer like you, and nobody likes to work without any result (in this case, your little fee), so if you register it you will make me a happier person (and you will be as well, because you will do the correct thing). The fee for this component is only 35 US $. There are two ways to register TCDPlayer VCL component: 1.- Via online registration : You can register this component from Qwerks Shareware Registration Services. Transactions are via Credit Card with the option of making the purchase over a secure server, via an U.S. tool free phone or fax. To do it this way please visit tCDPlayer web page : http://www.waveflow.com/vcl.htm 2.-Filling the Registration Formrf and sending me the money (35 $US) to the next postal address: Xavier Cirac Vidal Batlles , 4 Premia de Mar , 08330 Barcelona SPAIN Once I get your registration mail I will e-mail you with the source code and a sample demo if you need it (also with source code). Registration Form ----------------- Please Print the next form and fill in the information (if applicable) when you send me the registration letter: Company: _________________________________________ Name: _________________________________________ E-Mail: _________________________________________ Address: _________________________________________ City: _________________________________________ State/Province: ______________________________________ Country: _________________________________________ Optional Where did you find TCDPlayer? _____________________________________________________ What are you using TCDPlayer for? _____________________________________________________ Properties ---------- Visible properties: Active: Shows the state of the component (Active or not Active). Setting this property to true is the same that calling Open function. Runtime properties: (once called the Open function) Tracks: Gives you the number of tracks of the current CD. TotalLength: Gives you the total duration of the CD in seconds. Methods ------- Create: Creates the component Open:boolean: Initiallizes the CD and its properties. PlayTrack(track:integer):boolean: Plays a Track of the CD. Example: cdplayer1.PlayTrack(3); PlayFrom(Second:integer):boolean: Plays the CD from a concrete second. Example: cdplayer1.PlayFrom(360); Stop:boolean: Stops the playing Pause:boolean: Pauses the playing Restart:boolean: Restarts the playing when paused. Next:boolean: Next track Previous:boolean: Previous track Eject:boolean: Opens the CDROM drive door CloseDoor:boolean; Closes the CD drive door CDForward(Seconds:integer):boolean: Forwards the playing with the number of seconds passed into the parameter Seconds. CDRewind(Seconds:integer):boolean: Rewinds the playing with the number of seconds passed into the parameter Seconds. GetCurrentTrack:integer: Returns the current track that is being played. GetCurrentPosition:integer: Returns the current second that is being played. GetTrackLength(Track:integer):integer: Returns the duration in seconds of the track number passed into the parameter Track. GetTrackBegin(Track:integer):integer; Returns begining time in seconds of the track number passed into the parameter Track. GetTotalLength:integer: Returns the total duration in seconds of the whole CD. Note: All the functions that return a boolean value return false if there was an error while calling the function and true otherwise. Installation ------------ To Install TCDplayer there are two ways: If you have Delphi 4.0 you only have to install the tcdplayer package doing EXACTLY: -Component Install Packages Add ...and Browse for the cdpkg4.bpl file Check the option "Build with runtime packages" (Must be enabled) ...and Browse for the cdpkg4.dcp file Check the option "default" (Must be enabled) OK -Copy the file cdpkg4.bpl to your Windows\System If you have Delphi 3.0 you only have to install the tcdplayer package doing EXACTLY: -Component Install Packages Add ...and Browse for the cdpkg.dpl file Check the option "Build with runtime packages" (Must be enabled) ...and Browse for the cdpkg.dcp file Check the option "default" (Must be enabled) OK -Copy the file cdpkg.dpl to your Windows\System If you have Delphi 2.0 you will have to do: -Component -Install -Add (and Browse for the cdplayer.dcu file) If you have C++Builder you will have to do: -Component -Install -Add (and Browse for the cdplayer.obj file) Note: Remember that you have to install tcdplayer to a directory accessible by Delphi (check the Delphi menu option Tools/Environment Options/Library/Library Path). If the directory where you have installed tcdplayer is not listed there try to add it or to copy tcdplayer files to any of the listed directories. ...and that's all. If setup succeed you will see a new palette called UsefulTools (if you are looking for more useful tools please visit http://www.waveflow.com/vcl.htm). Example ------- This example uses some of the TCDPlayer fucntions: if cdplayer1.Open then begin label6.caption:='Tracks:'+inttostr(cdplayer1.tracks); cdplayer1.PlayTrack(1); label1.caption:='Current Track:'+inttostr(cdplayer1.GetCurrentTrack); label2.caption:='Position:'+inttostr(cdplayer1.GetCurrentPosition); label3.caption:='tracklength:' + inttostr(cdplayer1.GetTrackLength(cdplayer1.GetCurrentTrack)); label4.caption:='Track Begin:' + inttostr(cdplayer1.GetTrackBegin(cdplayer1.GetCurrentTrack)); label5.caption:='Total Duration:'+inttostr(cdplayer1.GetTotalLength); end;