'cdplay', a simple utility for playing compact disks with both a command line

and an interactive mode.
This commit is contained in:
ad 1999-06-05 13:21:59 +00:00
parent fc9e9301f8
commit dff6953739
4 changed files with 1203 additions and 3 deletions

View File

@ -1,12 +1,12 @@
# $NetBSD: Makefile,v 1.101 1999/03/26 16:53:29 tron Exp $
# $NetBSD: Makefile,v 1.102 1999/06/05 13:21:59 ad Exp $
# from: @(#)Makefile 8.3 (Berkeley) 1/7/94
.include <bsd.own.mk> # for EXPORTABLE_SYSTEM definition
# # and OBJECT_FMT definition
SUBDIR= apply apropos asa at audio banner basename bdes biff \
bzip2 bzip2recover cal calendar cap_mkdb checknr chflags chpass \
cksum cmp col colcrt colrm column comm compress \
bzip2 bzip2recover cal calendar cap_mkdb cdplay checknr chflags \
chpass cksum cmp col colcrt colrm column comm compress \
crontab crunch ctags cut dirname du eject env \
error expand false fdformat fgen file find finger fmt fold fpr \
from fsplit fstat ftp gencat getconf getopt gprof head hesinfo \

6
usr.bin/cdplay/Makefile Normal file
View File

@ -0,0 +1,6 @@
# $NetBSD: Makefile,v 1.1 1999/06/05 13:22:00 ad Exp $
PROG= cdplay
SRCS= cdplay.c
.include <bsd.prog.mk>

149
usr.bin/cdplay/cdplay.1 Normal file
View File

@ -0,0 +1,149 @@
.\" $NetBSD: cdplay.1,v 1.1 1999/06/05 13:22:00 ad Exp $
.\"
.\" From: Id: cdcontrol.1,v 1.16.2.2 1999/01/31 15:36:01 billf Exp
.\"
.Dd June 4, 1998
.Dt CDPLAY 1
.Os
.Sh NAME
.Nm cdplay
.Nd compact disc player
.Sh SYNOPSIS
.Nm cdplay
.Op Fl f Ar device
.Op Ar command ...
.Sh DESCRIPTION
.Nm Cdplay
is a program to control audio features of a CD drive.
If the device not specified, the environment variables
.Ev MUSIC_CD ,
.Ev CD_DRIVE ,
.Ev DISC
and
.Ev CDPLAY
will be tried (in this order) to find the cd device.
.Pp
If no command is given, then
.Nm
enters an interactive mode, reading commands from the standard input.
.Pp
The following options are available:
.Bl -tag -width indent
.It Fl f Ar device
Specify a device, such as
.Pa /dev/cd0c
(or
.Pa /dev/cd0d
on the i386 architecture).
Both absolute path and relative to
.Pa /dev
filename are possible.
Suffix `c' (or 'd' on the i386 architecture) is added to the device name if needed.
.El
.Pp
The available commands are listed below. Only as many
characters as are required to uniquely identify a command
need be specified. Word
.Em play
can be omitted.
.Bl -tag -width Cm
.It Cm play Ar first_track Op Ar last_track
Play from track
.Ar first_track
to track
.Ar last_track .
The first track has number 1.
Can be omitted in all cases.
.It Cm play Ar start_m:start_s.start_f Op Ar end_m:end_s.end_f
Play from the absolute address
(MSF) defined by
.Ar start_m
in minutes,
.Ar start_s ,
in seconds and
.Ar start_f
(frame number) to the absolute address defined by
.Ar end_m
in minutes,
.Ar end_s ,
in seconds and
.Ar end_f
(frame number). Minutes are in the range 0-99. Seconds are in the range 0-59.
Frame numbers are in the range 0-74.
.It Cm play Op Ar #start_block Op length
Play starting from the logical block
.Ar start_block
using
.Ar length
logical blocks.
.It Cm pause
Stop playing. Do not stop the disc.
.It Cm resume
Resume playing. Used after the
.Em pause
command.
.It Cm stop
Stop the disc.
.It Cm eject
Eject the disc.
.It Cm close
Inject the disc.
.It Cm volume Ar left_channel Ar right_channel
Set the volume of left channel to
.Ar left_channel
and the volume of right channel to
.Ar right_channel .
Allowed values are in the range 0-255.
.It Cm volume Ar mute
Turn the sound off.
.It Cm volume Ar mono
Set the mono mode.
.It Cm volume Ar stereo
Set the stereo mode.
.It Cm volume Ar left
Play the left subtrack on both left and right channels.
.It Cm volume Ar right
Play the right subtrack on both left and right channels.
.It Cm info
Print the table of contents.
.It Cm status
.Op Ar audio | media | volume
Print the information about the disc:
.Nm audio
the current playing status and position,
.Nm media
the current media catalog status,
.Nm volume
the current values of the volume for left and right channels.
.It Cm help
Print the list of available commands.
.It Cm reset
Perform the hardware reset of the device.
.It Cm set Ar msf
Set minute-second-frame ioctl mode (default).
.It Cm set Ar lba
Set LBA ioctl mode.
.It Cm quit
Quit the program.
.El
.Sh FILES
.Bl -tag -width /dev/rmcd0c -compact
.It Pa /dev/cd??
.It Pa /dev/mcd??
.El
.Sh AUTHORS
.An Jean-Marc Zucconi ,
.An Andrey A.\ Chernov ,
.An Serge V.\ Vakulenko ,
.An Andy Doran
.Sh HISTORY
The
.Nm
command first appeared in
.Fx 2.1
as
.Nm cdcontrol .

1045
usr.bin/cdplay/cdplay.c Normal file

File diff suppressed because it is too large Load Diff