cdplayer(1)

NAME
cdplayer - play Audio CD's in a supported CDROM drive

SYNOPSIS
cdplayer command [track no/volume no] command ...
Commands: play stop info pause resume eject skip volume status device

DESCRIPTION
This manual page documents the cdplayer program. This is a simple utility for playing Audio CD's on a supported CDROM drive. The program uses the Sun ioctl interface to communicate the appropriate commands to the CDROM. A special routine is provided at compile time to support NEC CDROM drives that require special calls to enable Audio mode. cdplayer first checks to see if the CDROM drive is currently mounted. If it is an error is returned and the program is aborted. Otherwise, the command provided is executed. cdplayer gives a quick and easy when to play an Audio CD on a UNIX system from the command line.

  OPTIONS

play, -p, --play
    Play an Audio CD starting at track 1. If a track argument is given and the track number is valid, the play command will start playing from the specified track.

stop, -s, --stop
    Stops an Audio CD that is currently being played.

info, -i, --info
    Displays info on the Audio CD in the CDROM drive. The total number of tracks, total playing time, and time per track is displayed, as well as the status of the drive and current track in play.

pause, -a, --pause
    Pauses the Audio CD currently in play. If the CD is not currently playing, then the command does nothing. The resume command must be used to restart a paused CD.

resume, -r, --resume
    Resumes a playing Audio CD that has been paused. If the CD has not been paused, the command is ignored.

eject, -e, --eject
    Ejects an Audio CD from the CDROM drive. This function will only work on a CDROM drive supporting this feature. For example, the Mitsumi CDROM drive does not support this feature.

skip, -k, --skip
    Skips the Audio CD to the next track. If the Audio CD is on the last track, then cdplayer will ignore this command.

volume, vol, -v, --volume
    Adjusts the volume for the CD. This command requires a parameter of a number between 0 and 255. The volume of the CDROM drive will be set to this value. Note: Not all drives/drivers support this feature.

status, -u, --status
    Returns the status of the drive. If it is currently playing or os paused, the current track number is also returned.

device, -d, --device
    Set the device to open and send commands to. This permits operating a CDROM other than the compiled in default. The full path to the device is supplied as a parameter to this command.
    If no command line options are provided, the program print a usage message, displays the available commands, and exit with a non-zero status. If an error occurs, an exit status of 1 is returned. Multiple commands are permitted on the command line. The maximum length of the command line is 256 characters. For example, the following commands are valid: cdplayer play 10 info volume 150 - play track 10, show info on the CD, and set the volume to 150 cdplayer device /dev/mcd play device /dev/sr0 play - set both /dev/mcd and /dev/sr0 to play mode Yes, this does mean more than one CDROM device can be used on the same command line. All commands are acted on the last device specified.

ENVIRONMENT

CD_DEVICE
    Sets the CDROM device to open. This permits redefining the CDROM device without having to recompile the program or specify it on the command line. Order of precidence: 1) device command, 2) CD_DEVICE environment variable, 3) Compiled in default. The device command always overrides the environment and the compiled in default.

BUGS

Kotobuki/Matsushita/Panasonic CR-5xx drivers (usually attached to a Sound Blaster or compatible) have lots of problems that cause all sort of complications with cdplayer. See tkcd(1) for more information. Some CDROMs or CDROM drivers do not respond to the skip command and ignore it. If this occurs, use the stop command, and then the play command. Also, report the problem. Some NEC CDROM's don't work with the NEC code...on some Linux machines it may hang the system (rare). This may be a SCSI driver problem. Please send any bug reports to mark@datasoft.com.

AUTHOR
Mark Buckaway (mark@datasoft.com), Datasoft Communications Feel free to comment on the program's useful/useless-ness. If you find this program works with your CDROM, please let me know the brand and model. I'd like create a list of "compatible drives". The nec_ioctl code was borrowed from xcdplayer-NEC.tar.Z found on tsx-11.mit.edu in /pub/linux/BETA/cdrom. This is not my code and apparently is written by rusty@belch.berkeley.edu. This code segment appears in the program slightly modified.

LICENSE
cdplayer is distributed under the GNU Public License. Please refer to the source for details.