cdplay – a trivial NetBSD/OpenBSD command line player.
Yeah. It’s amazingly trivial. Chris wrote this little thing for NetBSD aeons ago, and I was tired of having to deal with multiple commands to only play a few songs off a given CD.
It works, even if it is ugly. ;)
11:17 [mephit] /home/shawn/src%cc -o cdplay cdplay.c
11:18 [mephit] /home/shawn/src%./cdplay -h
./cdplay [-s starttrack] [-e endtrack] [-d device] [-i|j|l|p|r|q]
Defaults to playing the entire disc in cd0. Plays a single track if just
the starting track specified, otherwise plays all tracks in range s to e.
”-i” reports the number of tracks on the disc. Does not play.
”-j” ejects the disc.
”-l” loads the disc (not many support this properly).
”-p” pauses current playback of the disc.
”-r” resumes playback from last pause.
”-q” even less verbose.
/* commands a cdrom device to play audio. Probably Net/OpenBSD specific.
*— * cc -o cdplay -c cdplay.c [-D__NetBSD__]
*— * usage: cdplay [-s starttrack] [-e endtrack] [-d device] [-i|j|l|p|r|q]
* Defaults to playing the entire disc in cd0. Plays a single track if just
* the starting track specified, otherwise plays all tracks in range s to e.
* ”-i” reports the number of tracks on the disc. Does not play.
* ”-j” ejects the disc.
* ”-l” loads the disc (not many support this properly).
* ”-p” pauses current playback of the disc.
* ”-r” resumes playback from last pause.
* ”-q” make it shut up. Please, make it shut up!
*— * [$Id]
* Chris Baird,, Released to the public domain.
* Uber-trivial tweaks and additions by Shawn Holwegner .
*/