dcd: Dave's CD player v0.04

Installation instructions are in the file named INSTALL.
The copying policy and license for use are in the file named COPYING.


What is it? -- dcd is, IM(very H)O, the definitive *nix style CD-ROM
player.  UNIX and most of its derivatives, including Linux, focus on small
utilities whose power come from being linked together in new and unusual
ways. dcd is just such a utility. It will start and stop the CD player,
and allow you to `loop' tracks in the fashion of better programmable CD
players. That's all it does. Use it in shell scripts. Pipe its
(minimal) output to sed. Whatever. (I use it in tandem with cron as an
alarm clock. :) 


Building: `make' will work just fine for almost everyone. There are a few
things in the Makefile you may wish to configure, but not many; the
defaults work just fine for most people.

If you don't have a symlink called /dev/cdrom you can either make one,
or edit the Makefile.

If you use a 1.x kernel, many things will not work. I apologize, but it
honestly can't be helped (at least not by me). They changed the ioctl's
drastically from 1.x to 2.x and rewriting would be more trouble than it's
worth (again, for me). If you have a working 1.x system, and a bit of
C experience, feel free to make the changes. I won't mind. Really.

Using dcd:
dcd by itself starts the disk on track 1.
dcd n will play track n.
dcd 0 will stop the disk. (dcd stop will do the same thing.)
dcd restart restarts the current track.
dcd next starts the next track, and...
dcd prev starts the previous track.
dcd info reports information on the disk in play;
dcd dir reports information on the entire disk.
dcd loop (numbers) will loop, continually playing the specified track(s).

All parameters can be shortened to their first letter; dcd i is just as
good as dcd info. dcd l 1 3 7 is the same as dcd loop 1 3 7 and a little
bit shorter. :)

Looping is a bit tricky, mostly because Linux's sleep() call depends
somewhat on how heavily the system is loaded, and perhaps the phase
of the moon. The last few seconds of a track may be cut off, or the
first few seconds of the next track may be played before the next track
in a loop sequence starts. Little can be done about this, sorry.

True Linux gurus indeed will be thrilled by the knowledge that, in
addition to all that, you can upset the timer completely with kill.
Send your running dcd process SIGUSR1 to go back a track, or SIGUSR2
to advance to the next one. Signals screw with sleep() in funny ways,
so you really shouldn't do this.


This program is (C) 1998 David E. Smith, and covered by the GNU GPL.
By popular demand, said GPL is included in the file COPYING.


Credits: I did the code. KernAk and LordPEZ provided invaluable moral support.
Special thanks go to Scott Walker for sending me dcd's first fan letter ;)
and for asking me to write the loop code in the first place. It's been
productive, educational, and occasionally fun.
Thanks to Luc Vrancx for the SCSI patches, and Kevin Thompson for letting
me know how (un)well things worked on a 1.x system.

Comments to dave@bureau42.ml.org
