CDplayer 2.0
by Mark Buckaway (mark@datasoft.com)

Introduction

This is the third release of CDplayer. The first release I wrote because I did
not run X and all cdplayers at the time required X. If you like the command
line, this program is for you. I updated the program because I got bored late
one Saturday night and thought a few concerned could be addressed.  The third
release was prompted by Udo Munk sending me patches to make CDplayer work with
Coherent 4.2. I almost released version 1.1 with Udo's minor changes.  I would
have done so if Michael Hamilton had not sent me a X interface for CDplayer
namely TkCD. This prompted me to re-write CDplayer entirely. I had wanted to
"flex my flex musles" and try my hand at flex and bison, so I did. What I
ended up with is a VERY flex-ible CDplayer that now supports multiple CDROM
drives and features an X interface as well (although this is not required, you
can still run CDplayer from the command line). Because of the major re-write,
the version number has been bumped to version 2.0. I think after reading some
of the things you can now do with CDplayer, you'll have a better understanding
of WHY.

For information on using TkCD, please see README.tkcd.

*******************************************************************************
NOTE: If you have a Linux system and use the sbpcd driver for your CDROM, please
read the BUGS.sbpcd file. This information will apply to you.
*******************************************************************************


Copying

Please read the COPYING file for the conditions under which this
software can be used and distributed.

For copying information on TkCD, please refer to the README.tkcd.

What is it?

CDplayer is a silly little utility to play audio CD's in a CDROM
drive attached to Linux or Coherent 4.2 system. The program is command line
oriented.  IT DOES NOT REQUIRE THE X WINDOW SYSTEM (although TkCD is rather
nice).

Currently, it allows CD's:
- to play,
- to play starting from a track,
- to be stopped, 
- to be paused and resumed,
- to skip to the next track
- to change the volume
- to get info on the CD
- to get the status of the CDROM drive (audio mode only)
- to be ejected
- to select a different CDROM device to process commands on
- to allow multiple commands on the command line at the same time (this
means you can actually set CDplayer to play all x number of CDROM's on your
system!) 

The program is run, the command processed, and the program exited. This
program does not consume a process because it does not become a daemon.

The program is designed to be a quick and simple solution to getting
noise from your Linux/Coherent supported CDROM drive.

See the CHANGES file for what's has changed, been added, been fixed,
been broken, etc..

The biggest step forward in the program is the ability to supply multiple
commands on the command line. For example, the following are valid:

cdplayer play 10 info volume 129
- play track 10, show info on the CD, and set the volume to 129

cdplayer device /dev/mcd play device /dev/sr0 play
- set /dev/mcd to play AND /dev/sr0 to play.

The only cravate is the command line is limited to 256 characters max.


Compiling and Installing.

To compile CDplayer you WILL require either GNU Flex and Bison or brand x yacc
and lex as well as ar and sed. Using Lex and Yacc, CDplayer compiles correctly
on a Coherent system. The compile time options are set by the Configure script
which is automatically run when you type make for the first time. Configure
favours the GNU flavour of tools (gcc, bison, and flex) over the non-GNU tools
if it find them. Configure also requires "sed" to be on your system and will
complaining if it is not in your path. Configure has been made as generic as possible and should work with any Bourne/Korn shell.

If you wish to use TkCD, you will also require Tk/tcl. If the Configure script
does not find Tk/tcl interpreter, wish, TkCD is ignored and will not be configured and installed.

The cdplayer distribution has been broken into a series of directories:
	src - 	Source files
	bin -	compiled binaries
	docs -	man pages and supplimentary info
	bitmaps - tkcd's bitmaps

To configure and install CDplayer and TkCD, do the following:

1) Type 'make' or './configure' to configure CDplayer.

2) Type 'make install' install CDplayer and TkCD.

Alternatively, you can just type 'make install' to compile and install the package.

To clean up, type 'make clean'. To remove everything that can't be
remade, type 'type mrproper". 'make mrproper' is required if you which to reconfigure CDplayer or TkCD.

The default distribution assumes you want to install TkCD. If you run X, you'll
want to use it. If you don't have X, then you most likely won't have wish
installed. wish is the Tk/tcl interpreter. If this is the case, configure will
ignore TkCD and it will not be installed.

*PLEASE* read everything when running in configure. There are some important items that cannot be missed.

Using CDplayer

First, type "cdplayer" and read the options shown. If you can't figure this
out, please read the manpage. If you need help, please ask.

Just a little warning, you should set the permissions on CDplayer such
that those with console access can use it. Not a big deal for single
user system but you really won't want someone remotely changing the
song on you, eh? :)


Compatibility.

This program works in my system. I have a 386DX40, 16MB, Mitsumi (Blech... 
single speed) CDROM, and Linux 1.1.44 (and counting). I have had many reports
that various SCSI CDROM's work. The "new" NEC CDROM code should grab the rest
of them and make them compatible. Micheal Peek (peek@math.utk.edu) says this
works with his NEC CDR-55JD. Udo Mund (udo@umunk.GUN.de) has made CDplayer work
with Coherent as well. Michael Hamilton (hamilton@wcc.govt.nz) has it working
with TkCD on a CDROM drive I can't spell attached to his Sound Blaster. Michael
reports that this sbpcd Linux driver is buggy and does strange things. Please BUGS.sbpcd for details.

If you find this works on your CDROM, please let me know via email
the type (and SCSI card where applicable). I'd like to make a COMPATIBILY
file for the next release.

Future

At one point, I had planned to make a curses interface to CDplayer. Now, I
have found out that someone has crafted WorkBone, a cdplayer with a curses
interface, I have given up on this idea. Rather than re-invent the wheel,
methinks I'll leave CDplayer as a command line utility. Perhaps, I will add in
the future I'll add random track selection. TkCD picks up where CDplayer
leaves off under X while still allowing the command line stuff to work. If I really get bored, I might work up a curses interface so CDplayer will be available from the command line, in text mode, and in X. More importantly, methinks adding random play to CDplayer is the next logical step. This will require CDplayer become a daemon and will have to use sockets or named pipes for control. If I use sockets, this would permit such strange things as starting up the CDROM in Florida using a computer on the net in Toronto...like as if this is really important! :)


Porting

If you port this program to another flavour of *NIX, please email me your
patches. The Configure script and program code has been setup to accept
patching for other *NIX systems. This type of thing usually prompts me
to get creative with the program and expand it as well as adding the
patches.


Contacting the Author

You can contact me, Mark Buckaway, at:

Email: mark@datasoft.com (or mark@datasoft.north.net)
Voice: +1 416 756 4497 EST (evenings)
Smail: DataSoft Communications
       62 Rock Fernway
       Willowdale, ON
       M2J 4N5
       CANADA

For questions regarding TkCD, please see README.tkcd. Michael Hamilton 
can help you with TkCD.

Thanks

Thanks to all those who have tried CDplayer and let me know it works.  Thanks
for Micheal Peek (peek@math.utk.edu) for letting me know the version 1.0
compiles on his system, the NEC stuff works for him, and making info command
look better. Thanks to Udo Munk for fiddling with the program to make it run on
Coherent 4.2, for making me feel like first time programming, going out of his
way to find bugs, making cdplayer compile AND run with lex, and generally for
make the smallest of patches that cause me to re-write parts of the CDplayer
distribution :-) Seriously, Udo has done alot to make CDplayer more portable
and work on more than my Linux box. Hats off to Udo.  Thanks to Michael
Hamilton (hamilton@wcc.govt.nz or michael@actrix.gen.nz) for crafting tkcd, the
Tk X interface to CDplayer.  Without these people, CDplayer would not be what
is it today (and to think this all started because I was bored on Saturday
night and didn't feel like setting up X). If you've helped me, and I have not
mentioned you here, email me and use lots of four letter (or more, depending on
your native language) words.


Where to find CDplayer

CDplayer is uploaded to sunsite.unc.edu (Linux) and raven.alaska.edu (Coherent).
Check the index file on these sites as to the appropriate location.


