home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-29 | 53.1 KB | 1,560 lines |
- Newsgroups: alt.sources
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!sandman.lerc.nasa.gov!drich
- From: drich@sandman.lerc.nasa.gov (Daniel Rich)
- Subject: xcdplayer-2.2, Part (2/5) - X11 CD player for Sun and SGI
- Message-ID: <1992Dec28.225241.21643@eagle.lerc.nasa.gov>
- Sender: news@eagle.lerc.nasa.gov
- Nntp-Posting-Host: sandman.lerc.nasa.gov
- Organization: NASA Lewis Research Center
- Date: Mon, 28 Dec 1992 22:52:41 GMT
- Lines: 1548
-
- Submitted-by: drich@lerc.nasa.gov
- Archive-name: xcdplayer-2.2/part02
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 2 (of 5)."
- # Contents: xcdplayer-2.2/README xcdplayer-2.2/XCdplayer.ad
- # xcdplayer-2.2/XCdplayer.ad.sgi xcdplayer-2.2/XCdplayer.ad.sun
- # xcdplayer-2.2/cdgrab.c xcdplayer-2.2/cdinfo.c
- # xcdplayer-2.2/xcdplayer.1
- # Wrapped by drich@sandman on Mon Dec 28 17:30:37 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -d 'xcdplayer-2.2' ; then
- :
- else
- mkdir xcdplayer-2.2
- fi
- if test -f 'xcdplayer-2.2/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/README'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/README'\" \(7017 characters\)
- sed "s/^X//" >'xcdplayer-2.2/README' <<'END_OF_FILE'
- XTo compile and install this on Sun or SGI, you only need to type:
- X xmkmf
- X make depend
- X make
- XAnd, if all went well, copy the appropriate XCdplayer.ad.* file to
- XXCdplayer.ad (some day, this will get added to the Imakefile) and type:
- X make install
- X
- XIf you don't have Imake, then you will need to hack the Makefile. The
- Xone provided should work fine on an SGI.
- X
- XPlease send any problems/questions/bug-reports to drich@lerc.nasa.gov.
- X
- XBrought to you by:
- X drich@lerc.nasa.gov
- X wsadkin@bbn.com
- X rusty@belch.berkeley.edu
- X
- XNOTE FOR PEOPLE WHO WONDER WHY NONE OF THE BUTTONS SHOW UP WHEN THEY
- XSTART XCDPLAYER: You forgot to do a "make install" so that the
- XXCdplayer.ad file gets installed in the application defaults directory
- X(e.g., /usr/local/x11r4/lib/app-defaults). If you can't install files
- Xin the application defaults directory you can copy XCdplayer.ad to
- X~/XCdplayer and have a go at it.
- X
- X**** Coming in version 3.0 (I hope... :-))
- X
- Xo Track titles
- Xo New programming interface (as yet to be defined)
- Xo Single file/database for track and program information
- X
- X**** Wish List
- X
- Xo Motif support (I would like to see 3-D buttons (drich))
- Xo Merging of all of the button callbacks to eliminate redundant code
- X
- X**** Work in progress
- X
- Xo Record button (will be in the next release)
- X
- X**** Version history
- X
- XFri Oct 2 08:29:08 EDT 1992 - version 2.2
- X+ Fixes from Dan Rich (drich@lerc.nasa.gov) to:
- X Added support for SGI systems (IRIX 4.0.2 and greater only!), including
- X the ability to play through the audio port.
- X
- X+ You can now hit return from the disc title dialog to enter the title.
- X
- X+ Added a set of color defaults to make the application look more decorative.
- X
- X+ It will now detect a new disc being inserted into the CDROM drive.
- X
- X+ Added new timer button feature. Clicking when disc is stopped displays
- X time on entire disc.
- X
- X+ Ff and rewind will skip 15 seconds when the disc is paused instead of
- X the usual 3.
- X
- X+ Misc. bug fixes and code adjustments.
- X
- X
- XMon Sep 28 18:58:25 EDT 1992
- XFixes from Will Sadkin (wsadkin@bbn.com) to:
- X+ set up volume scrollbar color properly on color Suns.
- X
- XMon Feb 2 13:58:00 EDT 1991
- XFixes from Will Sadkin (wsadkin@bbn.com) to:
- X
- X+ fixed prev track button to go back to beginning of current track if more
- X than replayThreshold seconds have played, else go to previous track.
- X (1 resource added for this)
- X
- X+ fixed timing model to reflect "true" elapsed time
- X
- X+ fixed volume scrollbar display to be more intuitive, and to set volume to 3/4
- X on start-up (can't currently set to current level, as no query for volume
- X level is provided in the driver), and modified scroll procs to use volbase
- X and volpcent.
- X
- X+ added true fast-forward & rewind ("repeating" buttons)
- X (2 resources added to control scan skip and pause rate;
- X additional resources for placement and attributes)
- X
- X+ added title button and edit panel
- X (additional resources for placement and attributes)
- X
- X+ added program mode, complete with "popup" subpanel program editing,
- X program display, and save functions
- X (command line option (and personalizable resource) added to specify
- X program/title store directory)
- X (additional resources for placement and attributes)
- X
- X+ changed timer label to toggle button to show time remaining and/or program
- X time remaining (depending on context)
- X
- X+ made the icon = the cd logo; (NOTE: code does NOT follow conventions for
- X accomodating all window managers; probably just works for twm)
- X
- X+ added man page
- X
- X
- XTue Jul 16 19:47:01 PDT 1991
- X
- XNo changes or additions, just added a TODO file.
- X
- XMon Jul 1 14:31:17 PDT 1991
- X
- XFixes from Dan Trottier (dan@maccs.dcss.McMaster.CA) so that the
- Xvolume control works reasonably. This adds 2 new resources, volBase
- Xand volPcent. Both are floats. There are also command line options
- X-volBase and -volPcent. Reasonable values (also from Dan) are 187 for
- XvolBase and 0.267 for volPcent.
- X
- XMon Mar 11 18:24:36 PST 1991
- X
- XThe track label is now a toggle button. If you have trackLabel in
- Xyour .xrdb, .Xdefaults, or whatever file you'll need to change it to
- XtrackButton. When you click mouse button 1 on the track it displays
- Xthe highest track and when you release the mouse button it reverts
- Xback to the current track. Also moved the specification of the toggle
- Xbuttons' translations from the C code to the application defaults
- Xfile.
- X
- XTue Mar 5 17:56:30 PST 1991
- X
- XThe rewind button now works with shuffle; it goes back to the previous
- Xtrack that it played.
- X
- XMon Mar 4 18:14:22 PST 1991
- X
- XFixed a bug in the shuffle code.
- X
- XWed Feb 20 20:22:26 PST 1991
- X
- XAdded a volume control scrollbar. I don't find it very useful since
- Xvisually small movements of it cause large changes in volume; about
- Xonly the upper 10% is useful. You can directly set the volume with
- Xthe middle mouse button; it "grabs" the scrollbar and moves it to
- Xwherever the mouse is. The left and right mouse buttons make the
- Xscrollbar move in increments each time you click them. The left mouse
- Xbutton bumps it to the left and the right mouse button bumps it to the
- Xright. The amount they bump by is determined by where the mouse is in
- Xthe scrollbar; the more to the right the mouse is the more they bump
- Xit. (If anybody knows how to make the Athena form widget do a better
- Xlayout please tell me.)
- X
- XTue Jan 29 15:44:02 PST 1991
- X
- XThe shuffle button now works. If shuffle is off it can only be turned
- Xon if the cd is stopped, not while it is playing or paused. If
- Xshuffle is on it can be turned off while the cd is playing but due to
- Xthe way things work it will skip over the next track. In other words,
- Xif shuffle is on and it's playing track 3, you then click on the
- Xshuffle button, when it finishes track 3 it will start playing track
- X5. If anybody has a better pixmap for the shuffle button please send
- Xit to me.
- X
- XThu Jan 24 19:41:43 PST 1991
- X
- XFor those that don't recognize the buttons; first row, from left to
- Xright: play (right arrow), pause (two vertical bars), stop (square),
- Xrewind (two left arrows with a bar on the tip), fast forward (two
- Xright arrows with a bar on the tip), eject (up arrow with a bar
- Xunderneath). (Fast forward and rewind are misnomers, they only skip
- Xto the next or previous track.) The second row, from left to right:
- Xquit (bolt of lightning), repeat (two arrows chasing each other),
- Xshuffle (three question marks). Shuffle currently doesn't do
- Xanything.
- X
- XThe standard button bitmaps (play, stop, etc.) came from an X program
- Xfor playing SPARC audio files; I think its name may have been xplayer.
- XI think I may have modified some of them; made them thicker or adjusted
- Xthem in minor ways.
- X
- XMon Jan 7 20:11:09 PST 1991
- X
- XAfter you eject a disc and then insert another one, click on the stop
- Xbutton to make it read the disc's table of contents.
- X
- XFri Jan 4 13:49:28 PST 1991
- X
- XThis is a minimal program to control the CD-ROM drive on a Sun
- Xworkstation for playing audio discs and using the headphone jacks.
- XIt's not likely to compile on any other OS or anything prior to SunOS
- X4.1 due to the ioctl's for the Sun CD-ROM drive.
- END_OF_FILE
- if test 7017 -ne `wc -c <'xcdplayer-2.2/README'`; then
- echo shar: \"'xcdplayer-2.2/README'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/README'
- fi
- if test -f 'xcdplayer-2.2/XCdplayer.ad' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/XCdplayer.ad'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/XCdplayer.ad'\" \(8272 characters\)
- sed "s/^X//" >'xcdplayer-2.2/XCdplayer.ad' <<'END_OF_FILE'
- X! Copyright (C) 1990 Regents of the University of California.
- X! Permission to use, copy, modify, distribute, and sell this software and
- X! its documentation for any purpose is hereby granted without fee,
- X! provided that the above copyright notice appear in all copies and that
- X! both that copyright notice and this permission notice appear in
- X! supporting documentation, and that the name of the University of
- X! California not be used in advertising or publicity pertaining to
- X! distribution of the software without specific, written prior
- X! permission. the University of California makes no representations
- X! about the suitability of this software for any purpose. It is provided
- X! "as is" without express or implied warranty.
- X
- XXCdplayer*foreground: Blue
- XXCdplayer*background: LightGrey
- XXCdplayer*borderColor: Black
- XXCdplayer*allowShellResize: True
- XXCdplayer*resizable: True
- XXCdplayer*Font: -misc-fixed-bold-r-normal--13-*
- X
- XXCdplayer*logoLabel.foreground: Gold
- XXCdplayer*logoLabel.background: Black
- XXCdplayer*icon*foreground: Gold
- X
- XXCdplayer*versionLabel.Font: -misc-fixed-medium-r-normal--8-*
- XXCdplayer*versionLabel.foreground: Black
- XXCdplayer*versionLabel.width: 130
- XXCdplayer*versionLabel.fromHoriz: logoLabel
- X
- X! replayThreshold is the number of seconds that must be played before the
- X! previous track button will take you back to the beginning of the current
- X! track, rather than the previous one.
- XXCdplayer*replayThreshold: 4
- X
- X! scanSkipInterval is the number of seconds skipped at each fast-forward or
- X! reverse.
- XXCdplayer*scanSkipInterval: 3
- X! pauseSkipInterval is the number of seconds skipped at each fast-forward or
- X! reverse if the CD is paused.
- XXCdplayer*pauseSkipInterval: 15
- X
- X! scanPauseInterval is the number of seconds between each fast_forward or
- X! reverse while holding down the buttons. (Sun CDs have a dreadfully long
- X! start-up time for the audio to actually become audible, so "hearing the
- X! track" while scanning isn't very feasible.)
- XXCdplayer*scanPauseInterval: 0.062
- X! pausePauseInterval does the same thing when the disc is paused.
- XXCdplayer*pausePauseInterval: 0.5
- X
- X! cdInfoDir is the directory to search for stored data about discs.
- X! NOTE: this must currently be a fully specified path (ie no '~'s,
- X! environment vars, etc. This should only be set if you are using a local
- X! copy of the application defaults. The command line option -cdInfoDir <path>
- X! is provided for overriding the default path (null (= current dir))
- X!XCdplayer*cdInfoDir: eg: /usr/staff/yourname/CDs
- X
- XXCdplayer*Viewport.allowHoriz: True
- XXCdplayer*Viewport.useBottom: True
- XXCdplayer*Viewport.forceBars: False
- XXCdplayer*Viewport.width: 188
- XXCdplayer*Viewport.height: 30
- XXCdplayer*Viewport*thickness: 8
- XXCdplayer*Viewport.resizable: False
- X
- XXCdplayer*Form.defaultDistance: 1
- XXCdplayer*Form.internalHeight: 0
- XXCdplayer*Form.internalWidth: 0
- XXCdplayer*Form.borderWidth: 0
- X
- XXCdplayer*Label.internalHeight: 0
- XXCdplayer*Label.internalWidth: 0
- XXCdplayer*Label.borderWidth: 0
- XXCdplayer*Label.top: ChainTop
- XXCdplayer*Label.bottom: ChainTop
- XXCdplayer*Label.left: ChainLeft
- XXCdplayer*Label.right: ChainLeft
- X
- XXCdplayer*Command.background: Ivory
- XXCdplayer*Text.background: Ivory
- XXCdplayer*AsciiSink.background: Ivory
- XXCdplayer*AsciiSink.foreground: Red
- XXCdplayer*Scrollbar.foreground: White
- XXCdplayer*Scrollbar.background: Gold
- X
- XXCdplayer*Toggle.borderWidth: 1
- XXCdplayer*Toggle.top: ChainTop
- XXCdplayer*Toggle.bottom: ChainTop
- XXCdplayer*Toggle.left: ChainLeft
- XXCdplayer*Toggle.right: ChainLeft
- XXCdplayer*Toggle.background: Ivory
- X
- XXCdplayer*ledsLabel.horizDistance: 20
- XXCdplayer*ledsLabel.fromVert: versionLabel
- XXCdplayer*ledsLabel.fromHoriz: logoLabel
- X
- XXCdplayer*trackButton.horizDistance: 8
- XXCdplayer*trackButton.fromVert: versionLabel
- XXCdplayer*trackButton.fromHoriz: ledsLabel
- XXCdplayer*trackButton.borderWidth: 2
- XXCdplayer*trackButton.internalHeight: 4
- XXCdplayer*trackButton.internalWidth: 4
- X
- XXCdplayer*timerButton.borderWidth: 2
- XXCdplayer*timerButton.internalHeight: 4
- XXCdplayer*timerButton.internalWidth: 4
- XXCdplayer*timerButton.horizDistance: 2
- XXCdplayer*timerButton.fromVert: versionLabel
- XXCdplayer*timerButton.fromHoriz: trackButton
- XXCdplayer*timerButton.left: ChainRight
- XXCdplayer*timerButton.right: ChainRight
- X
- XXCdplayer*volumeScrollbar.horizDistance:8
- XXCdplayer*volumeScrollbar.fromHoriz: logoLabel
- XXCdplayer*volumeScrollbar.fromVert: trackButton
- XXCdplayer*volumeScrollbar.orientation: horizontal
- XXCdplayer*volumeScrollbar.length: 120
- XXCdplayer*volumeScrollbar.right: ChainRight
- XXCdplayer*volumeScrollbar.left: ChainRight
- XXCdplayer*volumeScrollbar.background: green
- XXCdplayer*volumeScrollbar.foreground: white
- XXCdplayer*volumeScrollbar.thumb: black
- X
- XXCdplayer*titleBarViewport.fromVert: volumeScrollbar
- XXCdplayer*titleBarViewport.forceBars: true
- XXCdplayer*titleBar.borderwidth: 0
- XXCdplayer*titleBar.highlightThickness: 1
- XXCdplayer*titleBar.foreground: Red
- XXCdplayer*titleBar.background: Ivory
- X
- XXCdplayer*titleDialog.Text.translations:#override\
- X <Key>Return: done()
- X
- XXCdplayer*buttonsForm.fromVert: logoForm
- XXCdplayer*buttonsForm.borderWidth: 1
- X
- XXCdplayer*pauseButton.fromHoriz: playButton
- XXCdplayer*stopButton.fromHoriz: pauseButton
- XXCdplayer*prevButton.fromHoriz: stopButton
- XXCdplayer*nextButton.fromHoriz: prevButton
- XXCdplayer*ejectButton.fromHoriz: nextButton
- XXCdplayer*audioButton.fromHoriz: ejectButton
- X
- XXCdplayer*quitButton.fromVert: playButton
- XXCdplayer*cycleButton.fromVert: playButton
- XXCdplayer*cycleButton.fromHoriz: quitButton
- XXCdplayer*shuffleButton.fromVert: playButton
- XXCdplayer*shuffleButton.fromHoriz: cycleButton
- XXCdplayer*rewButton.fromVert: playButton
- XXCdplayer*rewButton.fromHoriz: shuffleButton
- XXCdplayer*ffButton.fromVert: playButton
- XXCdplayer*ffButton.fromHoriz: rewButton
- XXCdplayer*pgmButton.fromVert: playButton
- XXCdplayer*pgmButton.fromHoriz: ffButton
- X
- XXCdplayer*stopButton.radioGroup: playButton
- XXCdplayer*ejectButton.radioGroup: playButton
- XXCdplayer*programForm.fromVert: buttonsForm
- XXCdplayer*programForm.borderWidth: 1
- X
- XXCdplayer*programDisplayViewport.forceBars: True
- X
- XXCdplayer*programDisplayForm.background: Black
- XXCdplayer*programDisplayForm*Toggle.background: Black
- XXCdplayer*programDisplayForm*Toggle.foreground: White
- XXCdplayer*programDisplayForm*Toggle.borderWidth: 0
- XXCdplayer*programDisplayForm*Toggle.highlightThickness: 0
- XXCdplayer*programDisplayForm*Toggle.internalWidth: 0
- XXCdplayer*programDisplayForm*Toggle.defaultDistance: 0
- X
- XXCdplayer*programDisplayForm*Toggle.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>,<Btn1Up>: set() notify()
- X
- X
- XXCdplayer*trackButton.translations: #override \
- X <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: reset() notify()
- X
- XXCdplayer*playButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*stopButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*ejectButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*audioButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*prevButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*nextButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*rewButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*ffButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*pgmButton.translations: #override \
- X <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n
- X <Btn1Up>: reset notify
- END_OF_FILE
- if test 8272 -ne `wc -c <'xcdplayer-2.2/XCdplayer.ad'`; then
- echo shar: \"'xcdplayer-2.2/XCdplayer.ad'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/XCdplayer.ad'
- fi
- if test -f 'xcdplayer-2.2/XCdplayer.ad.sgi' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/XCdplayer.ad.sgi'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/XCdplayer.ad.sgi'\" \(8272 characters\)
- sed "s/^X//" >'xcdplayer-2.2/XCdplayer.ad.sgi' <<'END_OF_FILE'
- X! Copyright (C) 1990 Regents of the University of California.
- X! Permission to use, copy, modify, distribute, and sell this software and
- X! its documentation for any purpose is hereby granted without fee,
- X! provided that the above copyright notice appear in all copies and that
- X! both that copyright notice and this permission notice appear in
- X! supporting documentation, and that the name of the University of
- X! California not be used in advertising or publicity pertaining to
- X! distribution of the software without specific, written prior
- X! permission. the University of California makes no representations
- X! about the suitability of this software for any purpose. It is provided
- X! "as is" without express or implied warranty.
- X
- XXCdplayer*foreground: Blue
- XXCdplayer*background: LightGrey
- XXCdplayer*borderColor: Black
- XXCdplayer*allowShellResize: True
- XXCdplayer*resizable: True
- XXCdplayer*Font: -misc-fixed-bold-r-normal--13-*
- X
- XXCdplayer*logoLabel.foreground: Gold
- XXCdplayer*logoLabel.background: Black
- XXCdplayer*icon*foreground: Gold
- X
- XXCdplayer*versionLabel.Font: -misc-fixed-medium-r-normal--8-*
- XXCdplayer*versionLabel.foreground: Black
- XXCdplayer*versionLabel.width: 130
- XXCdplayer*versionLabel.fromHoriz: logoLabel
- X
- X! replayThreshold is the number of seconds that must be played before the
- X! previous track button will take you back to the beginning of the current
- X! track, rather than the previous one.
- XXCdplayer*replayThreshold: 4
- X
- X! scanSkipInterval is the number of seconds skipped at each fast-forward or
- X! reverse.
- XXCdplayer*scanSkipInterval: 3
- X! pauseSkipInterval is the number of seconds skipped at each fast-forward or
- X! reverse if the CD is paused.
- XXCdplayer*pauseSkipInterval: 15
- X
- X! scanPauseInterval is the number of seconds between each fast_forward or
- X! reverse while holding down the buttons. (Sun CDs have a dreadfully long
- X! start-up time for the audio to actually become audible, so "hearing the
- X! track" while scanning isn't very feasible.)
- XXCdplayer*scanPauseInterval: 0.062
- X! pausePauseInterval does the same thing when the disc is paused.
- XXCdplayer*pausePauseInterval: 0.5
- X
- X! cdInfoDir is the directory to search for stored data about discs.
- X! NOTE: this must currently be a fully specified path (ie no '~'s,
- X! environment vars, etc. This should only be set if you are using a local
- X! copy of the application defaults. The command line option -cdInfoDir <path>
- X! is provided for overriding the default path (null (= current dir))
- X!XCdplayer*cdInfoDir: eg: /usr/staff/yourname/CDs
- X
- XXCdplayer*Viewport.allowHoriz: True
- XXCdplayer*Viewport.useBottom: True
- XXCdplayer*Viewport.forceBars: False
- XXCdplayer*Viewport.width: 188
- XXCdplayer*Viewport.height: 30
- XXCdplayer*Viewport*thickness: 8
- XXCdplayer*Viewport.resizable: False
- X
- XXCdplayer*Form.defaultDistance: 1
- XXCdplayer*Form.internalHeight: 0
- XXCdplayer*Form.internalWidth: 0
- XXCdplayer*Form.borderWidth: 0
- X
- XXCdplayer*Label.internalHeight: 0
- XXCdplayer*Label.internalWidth: 0
- XXCdplayer*Label.borderWidth: 0
- XXCdplayer*Label.top: ChainTop
- XXCdplayer*Label.bottom: ChainTop
- XXCdplayer*Label.left: ChainLeft
- XXCdplayer*Label.right: ChainLeft
- X
- XXCdplayer*Command.background: Ivory
- XXCdplayer*Text.background: Ivory
- XXCdplayer*AsciiSink.background: Ivory
- XXCdplayer*AsciiSink.foreground: Red
- XXCdplayer*Scrollbar.foreground: White
- XXCdplayer*Scrollbar.background: Gold
- X
- XXCdplayer*Toggle.borderWidth: 1
- XXCdplayer*Toggle.top: ChainTop
- XXCdplayer*Toggle.bottom: ChainTop
- XXCdplayer*Toggle.left: ChainLeft
- XXCdplayer*Toggle.right: ChainLeft
- XXCdplayer*Toggle.background: Ivory
- X
- XXCdplayer*ledsLabel.horizDistance: 20
- XXCdplayer*ledsLabel.fromVert: versionLabel
- XXCdplayer*ledsLabel.fromHoriz: logoLabel
- X
- XXCdplayer*trackButton.horizDistance: 8
- XXCdplayer*trackButton.fromVert: versionLabel
- XXCdplayer*trackButton.fromHoriz: ledsLabel
- XXCdplayer*trackButton.borderWidth: 2
- XXCdplayer*trackButton.internalHeight: 4
- XXCdplayer*trackButton.internalWidth: 4
- X
- XXCdplayer*timerButton.borderWidth: 2
- XXCdplayer*timerButton.internalHeight: 4
- XXCdplayer*timerButton.internalWidth: 4
- XXCdplayer*timerButton.horizDistance: 2
- XXCdplayer*timerButton.fromVert: versionLabel
- XXCdplayer*timerButton.fromHoriz: trackButton
- XXCdplayer*timerButton.left: ChainRight
- XXCdplayer*timerButton.right: ChainRight
- X
- XXCdplayer*volumeScrollbar.horizDistance:8
- XXCdplayer*volumeScrollbar.fromHoriz: logoLabel
- XXCdplayer*volumeScrollbar.fromVert: trackButton
- XXCdplayer*volumeScrollbar.orientation: horizontal
- XXCdplayer*volumeScrollbar.length: 120
- XXCdplayer*volumeScrollbar.right: ChainRight
- XXCdplayer*volumeScrollbar.left: ChainRight
- XXCdplayer*volumeScrollbar.background: green
- XXCdplayer*volumeScrollbar.foreground: white
- XXCdplayer*volumeScrollbar.thumb: black
- X
- XXCdplayer*titleBarViewport.fromVert: volumeScrollbar
- XXCdplayer*titleBarViewport.forceBars: true
- XXCdplayer*titleBar.borderwidth: 0
- XXCdplayer*titleBar.highlightThickness: 1
- XXCdplayer*titleBar.foreground: Red
- XXCdplayer*titleBar.background: Ivory
- X
- XXCdplayer*titleDialog.Text.translations:#override\
- X <Key>Return: done()
- X
- XXCdplayer*buttonsForm.fromVert: logoForm
- XXCdplayer*buttonsForm.borderWidth: 1
- X
- XXCdplayer*pauseButton.fromHoriz: playButton
- XXCdplayer*stopButton.fromHoriz: pauseButton
- XXCdplayer*prevButton.fromHoriz: stopButton
- XXCdplayer*nextButton.fromHoriz: prevButton
- XXCdplayer*ejectButton.fromHoriz: nextButton
- XXCdplayer*audioButton.fromHoriz: ejectButton
- X
- XXCdplayer*quitButton.fromVert: playButton
- XXCdplayer*cycleButton.fromVert: playButton
- XXCdplayer*cycleButton.fromHoriz: quitButton
- XXCdplayer*shuffleButton.fromVert: playButton
- XXCdplayer*shuffleButton.fromHoriz: cycleButton
- XXCdplayer*rewButton.fromVert: playButton
- XXCdplayer*rewButton.fromHoriz: shuffleButton
- XXCdplayer*ffButton.fromVert: playButton
- XXCdplayer*ffButton.fromHoriz: rewButton
- XXCdplayer*pgmButton.fromVert: playButton
- XXCdplayer*pgmButton.fromHoriz: ffButton
- X
- XXCdplayer*stopButton.radioGroup: playButton
- XXCdplayer*ejectButton.radioGroup: playButton
- XXCdplayer*programForm.fromVert: buttonsForm
- XXCdplayer*programForm.borderWidth: 1
- X
- XXCdplayer*programDisplayViewport.forceBars: True
- X
- XXCdplayer*programDisplayForm.background: Black
- XXCdplayer*programDisplayForm*Toggle.background: Black
- XXCdplayer*programDisplayForm*Toggle.foreground: White
- XXCdplayer*programDisplayForm*Toggle.borderWidth: 0
- XXCdplayer*programDisplayForm*Toggle.highlightThickness: 0
- XXCdplayer*programDisplayForm*Toggle.internalWidth: 0
- XXCdplayer*programDisplayForm*Toggle.defaultDistance: 0
- X
- XXCdplayer*programDisplayForm*Toggle.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>,<Btn1Up>: set() notify()
- X
- X
- XXCdplayer*trackButton.translations: #override \
- X <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: reset() notify()
- X
- XXCdplayer*playButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*stopButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*ejectButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*audioButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*prevButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*nextButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*rewButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*ffButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*pgmButton.translations: #override \
- X <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n
- X <Btn1Up>: reset notify
- END_OF_FILE
- if test 8272 -ne `wc -c <'xcdplayer-2.2/XCdplayer.ad.sgi'`; then
- echo shar: \"'xcdplayer-2.2/XCdplayer.ad.sgi'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/XCdplayer.ad.sgi'
- fi
- if test -f 'xcdplayer-2.2/XCdplayer.ad.sun' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/XCdplayer.ad.sun'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/XCdplayer.ad.sun'\" \(8082 characters\)
- sed "s/^X//" >'xcdplayer-2.2/XCdplayer.ad.sun' <<'END_OF_FILE'
- X! Copyright (C) 1990 Regents of the University of California.
- X! Permission to use, copy, modify, distribute, and sell this software and
- X! its documentation for any purpose is hereby granted without fee,
- X! provided that the above copyright notice appear in all copies and that
- X! both that copyright notice and this permission notice appear in
- X! supporting documentation, and that the name of the University of
- X! California not be used in advertising or publicity pertaining to
- X! distribution of the software without specific, written prior
- X! permission. the University of California makes no representations
- X! about the suitability of this software for any purpose. It is provided
- X! "as is" without express or implied warranty.
- X
- XXCdplayer*foreground: Blue
- XXCdplayer*background: LightGrey
- XXCdplayer*borderColor: Black
- XXCdplayer*allowShellResize: True
- XXCdplayer*resizable: True
- XXCdplayer*Font: -misc-fixed-bold-r-normal--13-*
- X
- XXCdplayer*logoLabel.foreground: Gold
- XXCdplayer*logoLabel.background: Black
- X
- XXCdplayer*versionLabel.Font: -misc-fixed-medium-r-normal--8-*
- XXCdplayer*versionLabel.foreground: Black
- XXCdplayer*versionLabel.width: 110
- XXCdplayer*versionLabel.fromHoriz: logoLabel
- X
- X! replayThreshold is the number of seconds that must be played before the
- X! previous track button will take you back to the beginning of the current
- X! track, rather than the previous one.
- XXCdplayer*replayThreshold: 4
- X
- X! scanSkipInterval is the number of seconds skipped at each fast-forward or
- X! reverse.
- XXCdplayer*scanSkipInterval: 3
- X! pauseSkipInterval is the number of seconds skipped at each fast-forward or
- X! reverse if the CD is paused.
- XXCdplayer*pauseSkipInterval: 15
- X
- X! scanPauseInterval is the number of seconds between each fast_forward or
- X! reverse while holding down the buttons. (Sun CDs have a dreadfully long
- X! start-up time for the audio to actually become audible, so "hearing the
- X! track" while scanning isn't very feasible.)
- XXCdplayer*scanPauseInterval: 0.062
- X! pausePauseInterval does the same thing when the disc is paused.
- XXCdplayer*pausePauseInterval: 0.5
- X
- X! cdInfoDir is the directory to search for stored data about discs.
- X! NOTE: this must currently be a fully specified path (ie no '~'s,
- X! environment vars, etc. This should only be set if you are using a local
- X! copy of the application defaults. The command line option -cdInfoDir <path>
- X! is provided for overriding the default path (null (= current dir))
- X!XCdplayer*cdInfoDir: eg: /usr/staff/yourname/CDs
- X
- XXCdplayer*Viewport.allowHoriz: True
- XXCdplayer*Viewport.useBottom: True
- XXCdplayer*Viewport.forceBars: False
- XXCdplayer*Viewport.width: 160
- XXCdplayer*Viewport.height: 30
- XXCdplayer*Viewport*thickness: 8
- XXCdplayer*Viewport.resizable: False
- X
- XXCdplayer*Form.defaultDistance: 1
- XXCdplayer*Form.internalHeight: 0
- XXCdplayer*Form.internalWidth: 0
- XXCdplayer*Form.borderWidth: 0
- X
- XXCdplayer*Label.internalHeight: 0
- XXCdplayer*Label.internalWidth: 0
- XXCdplayer*Label.borderWidth: 0
- XXCdplayer*Label.top: ChainTop
- XXCdplayer*Label.bottom: ChainTop
- XXCdplayer*Label.left: ChainLeft
- XXCdplayer*Label.right: ChainLeft
- X
- XXCdplayer*Command.background: Ivory
- XXCdplayer*Text.background: Ivory
- XXCdplayer*AsciiSink.background: Ivory
- XXCdplayer*AsciiSink.foreground: Red
- XXCdplayer*Scrollbar.foreground: White
- XXCdplayer*Scrollbar.background: Gold
- X
- XXCdplayer*Toggle.borderWidth: 1
- XXCdplayer*Toggle.top: ChainTop
- XXCdplayer*Toggle.bottom: ChainTop
- XXCdplayer*Toggle.left: ChainLeft
- XXCdplayer*Toggle.right: ChainLeft
- XXCdplayer*Toggle.background: Ivory
- X
- XXCdplayer*ledsLabel.horizDistance: 4
- XXCdplayer*ledsLabel.fromVert: versionLabel
- XXCdplayer*ledsLabel.fromHoriz: logoLabel
- X
- XXCdplayer*trackButton.horizDistance: 4
- XXCdplayer*trackButton.fromVert: versionLabel
- XXCdplayer*trackButton.fromHoriz: ledsLabel
- XXCdplayer*trackButton.borderWidth: 2
- XXCdplayer*trackButton.internalHeight: 4
- XXCdplayer*trackButton.internalWidth: 4
- X
- XXCdplayer*timerButton.borderWidth: 2
- XXCdplayer*timerButton.internalHeight: 4
- XXCdplayer*timerButton.internalWidth: 4
- XXCdplayer*timerButton.horizDistance: 2
- XXCdplayer*timerButton.fromVert: versionLabel
- XXCdplayer*timerButton.fromHoriz: trackButton
- XXCdplayer*timerButton.left: ChainRight
- XXCdplayer*timerButton.right: ChainRight
- X
- XXCdplayer*volumeScrollbar.horizDistance:4
- XXCdplayer*volumeScrollbar.fromHoriz: logoLabel
- XXCdplayer*volumeScrollbar.fromVert: trackButton
- XXCdplayer*volumeScrollbar.orientation: horizontal
- XXCdplayer*volumeScrollbar.length: 93
- XXCdplayer*volumeScrollbar.right: ChainRight
- XXCdplayer*volumeScrollbar.left: ChainRight
- XXCdplayer*volumeScrollbar.background: green
- XXCdplayer*volumeScrollbar.foreground: white
- X
- XXCdplayer*titleBarViewport.fromVert: volumeScrollbar
- XXCdplayer*titleBar.borderwidth: 0
- XXCdplayer*titleBar.highlightThickness: 1
- XXCdplayer*titleBar.foreground: Red
- XXCdplayer*titleBar.background: Ivory
- XXCdplayer*buttonsForm.fromVert: logoForm
- XXCdplayer*buttonsForm.borderWidth: 1
- X
- XXCdplayer*pauseButton.fromHoriz: playButton
- XXCdplayer*stopButton.fromHoriz: pauseButton
- XXCdplayer*prevButton.fromHoriz: stopButton
- XXCdplayer*nextButton.fromHoriz: prevButton
- XXCdplayer*ejectButton.fromHoriz: nextButton
- XXCdplayer*audioButton.fromHoriz: ejectButton
- X
- XXCdplayer*quitButton.fromVert: playButton
- XXCdplayer*cycleButton.fromVert: playButton
- XXCdplayer*cycleButton.fromHoriz: quitButton
- XXCdplayer*shuffleButton.fromVert: playButton
- XXCdplayer*shuffleButton.fromHoriz: cycleButton
- XXCdplayer*rewButton.fromVert: playButton
- XXCdplayer*rewButton.fromHoriz: shuffleButton
- XXCdplayer*ffButton.fromVert: playButton
- XXCdplayer*ffButton.fromHoriz: rewButton
- XXCdplayer*pgmButton.fromVert: playButton
- XXCdplayer*pgmButton.fromHoriz: ffButton
- X
- XXCdplayer*stopButton.radioGroup: playButton
- XXCdplayer*ejectButton.radioGroup: playButton
- XXCdplayer*programForm.fromVert: buttonsForm
- XXCdplayer*programForm.borderWidth: 1
- X
- XXCdplayer*programDisplayViewport.forceBars: True
- X
- XXCdplayer*programDisplayForm.background: Black
- XXCdplayer*programDisplayForm*Toggle.background: Black
- XXCdplayer*programDisplayForm*Toggle.foreground: White
- XXCdplayer*programDisplayForm*Toggle.borderWidth: 0
- XXCdplayer*programDisplayForm*Toggle.highlightThickness: 0
- XXCdplayer*programDisplayForm*Toggle.internalWidth: 0
- XXCdplayer*programDisplayForm*Toggle.defaultDistance: 0
- X
- XXCdplayer*programDisplayForm*Toggle.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>,<Btn1Up>: set() notify()
- X
- X
- XXCdplayer*trackButton.translations: #override \
- X <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: reset() notify()
- X
- XXCdplayer*playButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*stopButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*ejectButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*audioButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify()
- X
- XXCdplayer*prevButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*nextButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*rewButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*ffButton.translations: <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n\
- X <Btn1Up>: unset()
- X
- XXCdplayer*pgmButton.translations: #override \
- X <EnterWindow>: highlight(Always) \n\
- X <LeaveWindow>: unhighlight() \n\
- X <Btn1Down>: set() notify() \n
- X <Btn1Up>: reset notify
- END_OF_FILE
- if test 8082 -ne `wc -c <'xcdplayer-2.2/XCdplayer.ad.sun'`; then
- echo shar: \"'xcdplayer-2.2/XCdplayer.ad.sun'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/XCdplayer.ad.sun'
- fi
- if test -f 'xcdplayer-2.2/cdgrab.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/cdgrab.c'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/cdgrab.c'\" \(5026 characters\)
- sed "s/^X//" >'xcdplayer-2.2/cdgrab.c' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <sys/types.h>
- X# include <sys/buf.h>
- X
- X# include <sun/dkio.h>
- X
- X# include <scsi/targets/srdef.h>
- X# include <scsi/impl/uscsi.h>
- X
- X/*# include <sundev/srreg.h>*/
- X
- X# include <stdio.h>
- X
- Xchar cdrom[] = "/dev/rsr0";
- X
- Xextern void cdrom_open();
- Xextern char *cdrom_status_string();
- Xextern unsigned int cdrom_get_track();
- Xextern unsigned long *cdrom_get_times();
- Xextern unsigned long *ulong_malloc();
- X
- Xstatic int cdrom_fd;
- X
- Xunsigned long cdrom_mintrack;
- Xunsigned long cdrom_maxtrack;
- Xunsigned long *cdrom_times;
- X
- Xmain() {
- X cdrom_open();
- X
- X printf("status: %s\n", cdrom_status_string(cdrom_get_status()));
- X
- X cdrom_times = cdrom_get_times();
- X cdrom_print_toc();
- X}
- X
- Xvoid
- Xcdrom_open() {
- X if ((cdrom_fd = open(cdrom, 0)) == -1) {
- X fprintf(stderr, "open: ");
- X perror(cdrom);
- X
- X exit(1);
- X }
- X}
- X
- Xunsigned long *
- Xcdrom_get_times() {
- X struct cdrom_tochdr tochdr;
- X struct cdrom_tocentry tocentry;
- X extern unsigned long *ulong_malloc();
- X unsigned long trk, trk_total, otime;
- X unsigned long *cdrom_times;
- X
- X if (cdrom_read_tochdr(&tochdr) == -1)
- X return(NULL);
- X
- X cdrom_mintrack = tochdr.cdth_trk0;
- X cdrom_maxtrack = tochdr.cdth_trk1;
- X
- X cdrom_times = ulong_malloc(cdrom_maxtrack - cdrom_mintrack + 1);
- X
- X otime = 0;
- X
- X for (trk = cdrom_mintrack; trk <= cdrom_maxtrack; trk++) {
- X if (cdrom_read_tocentry(trk, &tocentry) == -1)
- X return(NULL);
- X
- X trk_total = ((int) tocentry.cdte_addr.msf.minute * 60) +
- X (int) tocentry.cdte_addr.msf.second;
- X
- X trk_total -= otime;
- X otime += trk_total;
- X
- X if (trk != cdrom_mintrack)
- X cdrom_times[trk - cdrom_mintrack - 1] = trk_total;
- X }
- X
- X if (cdrom_read_tocentry(CDROM_LEADOUT, &tocentry) == -1)
- X return(NULL);
- X
- X trk_total = ((int) tocentry.cdte_addr.msf.minute * 60) +
- X (int) tocentry.cdte_addr.msf.second;
- X
- X trk_total -= otime;
- X
- X cdrom_times[trk - cdrom_mintrack - 1] = trk_total;
- X
- X return(cdrom_times);
- X}
- X
- Xunsigned long *
- Xulong_malloc(n) {
- X extern char *malloc();
- X unsigned long *ptr;
- X
- X ptr = (unsigned long *) calloc(n, sizeof(unsigned long));
- X if (ptr == NULL) {
- X perror("malloc");
- X exit(1);
- X }
- X
- X return(ptr);
- X}
- X
- Xcdrom_print_toc() {
- X unsigned long trk, trk_total;
- X
- X for (trk = cdrom_mintrack; trk <= cdrom_maxtrack; trk++) {
- X trk_total = cdrom_times[trk - cdrom_mintrack];
- X printf("%02u:%02u\n", trk_total/60, trk_total%60);
- X }
- X}
- X
- Xcdrom_read_tocentry(trk, tocentry)
- X int trk;
- X struct cdrom_tocentry *tocentry;
- X{
- X tocentry->cdte_track = trk;
- X tocentry->cdte_format = CDROM_MSF;
- X
- X if (ioctl(cdrom_fd, CDROMREADTOCENTRY, (char *) tocentry) == -1) {
- X fprintf(stderr, "ioctl(cdromreadtocentry): ");
- X perror(cdrom);
- X
- X return(-1);
- X }
- X
- X return(0);
- X}
- X
- Xint
- Xcdrom_read_tochdr(tochdr)
- X struct cdrom_tochdr *tochdr;
- X{
- X if (ioctl(cdrom_fd, CDROMREADTOCHDR, (char *) tochdr) == -1) {
- X fprintf(stderr, "ioctl(cdromreadtochdr): ");
- X perror(cdrom);
- X
- X return(-1);
- X }
- X
- X return(0);
- X}
- X
- Xint
- Xcdrom_get_status() {
- X struct cdrom_subchnl subchnl;
- X
- X if (ioctl(cdrom_fd, CDROMSUBCHNL, (char *) &subchnl) == -1) {
- X fprintf(stderr, "ioctl(cdromsubchnl): ");
- X perror(cdrom);
- X
- X return(-1);
- X }
- X
- X return(subchnl.cdsc_audiostatus);
- X}
- X
- Xunsigned int
- Xcdrom_get_track() {
- X struct cdrom_subchnl subchnl;
- X
- X if (ioctl(cdrom_fd, CDROMSUBCHNL, (char *) &subchnl) == -1) {
- X fprintf(stderr, "ioctl(cdromsubchnl): ");
- X perror(cdrom);
- X
- X return(-1);
- X }
- X
- X return(subchnl.cdsc_trk);
- X}
- X
- Xchar *
- Xcdrom_status_string(status) {
- X static char buf[512];
- X typedef struct _status_table {
- X unsigned int st_val;
- X char *st_str;
- X } status_table;
- X static status_table st_table[] = {
- X { CDROM_AUDIO_INVALID, "audio status not supported" },
- X { CDROM_AUDIO_PLAY, "audio play operation in progress" },
- X { CDROM_AUDIO_PAUSED, "audio play operation paused" },
- X { CDROM_AUDIO_COMPLETED,"audio play successfully completed" },
- X { CDROM_AUDIO_ERROR, "audio play stopped due to error" },
- X { CDROM_AUDIO_NO_STATUS,"no current audio status to return" },
- X { -1, NULL }
- X };
- X status_table *st;
- X
- X switch (status) {
- X case CDROM_AUDIO_PLAY:
- X sprintf(buf, "playing track %d",
- X (unsigned int) cdrom_get_track());
- X return(buf);
- X
- X case CDROM_AUDIO_PAUSED:
- X sprintf(buf, "paused on track %d",
- X (unsigned int) cdrom_get_track());
- X return(buf);
- X }
- X
- X for (st = &st_table[0]; st->st_str != NULL; st++) {
- X if (status == st->st_val)
- X return(st->st_str);
- X }
- X
- X return("invalid status value");
- X}
- END_OF_FILE
- if test 5026 -ne `wc -c <'xcdplayer-2.2/cdgrab.c'`; then
- echo shar: \"'xcdplayer-2.2/cdgrab.c'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/cdgrab.c'
- fi
- if test -f 'xcdplayer-2.2/cdinfo.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/cdinfo.c'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/cdinfo.c'\" \(4625 characters\)
- sed "s/^X//" >'xcdplayer-2.2/cdinfo.c' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <sys/types.h>
- X# include <sys/buf.h>
- X# include <sun/dkio.h>
- X# include <scsi/targets/srdef.h>
- X
- X# include <stdio.h>
- X
- Xchar cdrom[] = "/dev/rsr0";
- X
- Xextern char * cdrom_status();
- X
- Xmain() {
- X int fd;
- X
- X if ((fd = open(cdrom, 0)) == -1) {
- X fprintf(stderr, "open: ");
- X perror(cdrom);
- X exit(1);
- X }
- X
- X printf("status: %s\n", cdrom_status(fd));
- X
- X cdrom_toc(fd, CDROM_MSF);
- X
- X cdrom_subchnl(fd, CDROM_MSF);
- X}
- X
- Xcdrom_toc(fd, fmt) {
- X struct cdrom_tochdr tochdr;
- X struct cdrom_tocentry tocentry;
- X int trk;
- X int otime, trk_total;
- X
- X if (cdrom_read_tochdr(fd, &tochdr) == -1)
- X return;
- X
- X printf("TRACK\tTIME\tFRAME\tTYPE\n");
- X
- X otime = 0;
- X
- X for (trk = tochdr.cdth_trk0; trk <= tochdr.cdth_trk1; trk++) {
- X if (cdrom_read_tocentry(fd, trk, fmt, &tocentry) == -1)
- X return;
- X
- X trk_total = ((int) tocentry.cdte_addr.msf.minute * 60) +
- X (int) tocentry.cdte_addr.msf.second;
- X
- X trk_total -= otime;
- X
- X if (otime != 0) {
- X printf("%d\t%02d:%02d", trk-1,
- X trk_total / 60,
- X trk_total % 60);
- X
- X printf("\t%d", (int) tocentry.cdte_addr.msf.frame);
- X
- X if (tocentry.cdte_ctrl & CDROM_DATA_TRACK)
- X printf("\tdata");
- X else
- X printf("\taudio");
- X
- X printf("\n");
- X }
- X
- X otime += trk_total;
- X }
- X
- X if (cdrom_read_tocentry(fd, CDROM_LEADOUT, fmt, &tocentry) == -1)
- X return;
- X
- X trk_total = ((int) tocentry.cdte_addr.msf.minute * 60) +
- X (int) tocentry.cdte_addr.msf.second;
- X
- X trk_total -= otime;
- X
- X printf("%d\t%02d:%02d", trk-1,
- X trk_total / 60,
- X trk_total % 60);
- X
- X printf("\t%d", (int) tocentry.cdte_addr.msf.frame);
- X
- X if (tocentry.cdte_ctrl & CDROM_DATA_TRACK)
- X printf("\tdata");
- X else
- X printf("\taudio");
- X
- X printf("\n");
- X}
- X
- Xcdrom_read_tocentry(fd, trk, fmt, tocentry)
- X int fd;
- X int trk, fmt;
- X struct cdrom_tocentry *tocentry;
- X{
- X tocentry->cdte_track = trk;
- X tocentry->cdte_format = fmt;
- X
- X if (ioctl(fd, CDROMREADTOCENTRY, (char *) tocentry) == -1) {
- X fprintf(stderr, "ioctl(cdromreadtocentry): ");
- X perror(cdrom);
- X
- X return(-1);
- X }
- X
- X return(0);
- X}
- X
- Xcdrom_read_tochdr(fd, tochdr)
- X int fd;
- X struct cdrom_tochdr *tochdr;
- X{
- X if (ioctl(fd, CDROMREADTOCHDR, (char *) tochdr) == -1) {
- X fprintf(stderr, "ioctl(cdromreadtochdr): ");
- X perror(cdrom);
- X
- X return(-1);
- X }
- X
- X return(0);
- X}
- X
- Xchar *
- Xcdrom_status(fd) {
- X static char buf[512];
- X struct cdrom_subchnl subchnl;
- X
- X if (ioctl(fd, CDROMSUBCHNL, (char *) &subchnl) == -1) {
- X fprintf(stderr, "ioctl(cdromsubchnl): ");
- X perror(cdrom);
- X exit(1);
- X }
- X
- X switch (subchnl.cdsc_audiostatus) {
- X case CDROM_AUDIO_INVALID:
- X return("invalid");
- X break;
- X
- X case CDROM_AUDIO_PLAY:
- X sprintf(buf, "playing track %d", (int) subchnl.cdsc_trk);
- X return(buf);
- X break;
- X
- X case CDROM_AUDIO_PAUSED:
- X sprintf(buf, "paused on track %d", (int) subchnl.cdsc_trk);
- X return(buf);
- X break;
- X
- X case CDROM_AUDIO_COMPLETED:
- X return("completed");
- X break;
- X
- X case CDROM_AUDIO_ERROR:
- X return("error");
- X break;
- X
- X case CDROM_AUDIO_NO_STATUS:
- X return("no status");
- X break;
- X }
- X
- X return("bad value in cdsc_audiostatus");
- X}
- X
- Xcdrom_subchnl(fd, fmt) {
- X struct cdrom_subchnl subchnl;
- X
- X if (ioctl(fd, CDROMSUBCHNL, (char *) &subchnl) == -1) {
- X fprintf(stderr, "ioctl(cdromsubchnl): ");
- X perror(cdrom);
- X exit(1);
- X }
- X
- X printf("subchnl:\n");
- X
- X printf("format=0x%x\n", (unsigned int) subchnl.cdsc_format);
- X printf("adr=%u\n", (unsigned int) subchnl.cdsc_adr);
- X printf("ctrl=%u\n", (unsigned int) subchnl.cdsc_ctrl);
- X printf("trk=%u\n", (unsigned int) subchnl.cdsc_trk);
- X printf("ind=%u\n", (unsigned int) subchnl.cdsc_ind);
- X
- X printf("absaddr=%02u:%02u %u\n",
- X (unsigned int) subchnl.cdsc_absaddr.msf.minute,
- X (unsigned int) subchnl.cdsc_absaddr.msf.second,
- X (unsigned int) subchnl.cdsc_absaddr.msf.frame);
- X
- X printf("reladdr=%02u:%02u %u\n",
- X (unsigned int) subchnl.cdsc_reladdr.msf.minute,
- X (unsigned int) subchnl.cdsc_reladdr.msf.second,
- X (unsigned int) subchnl.cdsc_reladdr.msf.frame);
- X}
- END_OF_FILE
- if test 4625 -ne `wc -c <'xcdplayer-2.2/cdinfo.c'`; then
- echo shar: \"'xcdplayer-2.2/cdinfo.c'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/cdinfo.c'
- fi
- if test -f 'xcdplayer-2.2/xcdplayer.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/xcdplayer.1'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/xcdplayer.1'\" \(6305 characters\)
- sed "s/^X//" >'xcdplayer-2.2/xcdplayer.1' <<'END_OF_FILE'
- X.TH XCDPLAYER 1 "Feb 3 1992" "X Version 11"
- X.SH NAME
- Xxcdplayer \- X window system interface to run the sun or sgi cdrom drive as a
- Xtypical audio CD player.
- X.SH SYNOPSIS
- X.B xcdplayer
- X[ \fI-toolkitoption ... \fP] [\fI-xcdplayeroption ... \fP]
- X.SH DESCRIPTION
- X\fIXcdplayer\fP is a graphical user interface for controlling the Sun or SGI cdrom
- Xdrive under the X Window System. It provides visual feedback and
- Xgives the user facilities for mode selection, device control, scanning, and
- Xprogramming.
- X.LP
- X\fIXcdplayer\fP allows previously stored cd title and program information to
- Xbe read from a specified directory and loaded into the player on startup
- Xor at disc changes. This directory can be specified either on the command
- Xline, by using the -cdInfoDir option, by using a customized personal resource
- Xfile, or by setting the environment variable XCDINFODIR. If no directory is
- Xspecified by any of these methods, xcdplayer looks in the current directory.
- X.LP
- X.SH OPTIONS
- X\fIXcdplayer\fP accepts all of the standard X Toolkit command line options
- X(see \fIX\fP(1)), plus the following xcdplayer specific options:
- X.IP "-debug" 12
- XDisplays debugging messages as the tool runs.
- X.IP -device devname
- XCDROM device to use (useful for systems with multiple CDROM drives)
- X.IP -volBase <[0..255]>
- XBottom of volume scale for player [range 0-255] (default 187)
- X.IP -volPcent <float>
- XRatio of volume change [range 0..255] to percent of scrollbar shown
- X(default .267). This value is used in conjunction with the volBase parameter.
- X.IP -cdInfoDir <path>
- XSpecifies which directory should be used for storing and looking up
- XCD information.
- X
- X
- X.SH SUBWINDOWS
- X\fIXcdplayer\fP contains the following subwindows:
- X.IP "Title Window" 20
- XDisplays the title of the CD (if stored or entered) corresponding to the CD
- Xcurrently in the CD player.
- X.IP "Program Window"
- XBrought up on press of the program button, this panel contains a viewport
- Xdisplaying the current selected program, option buttons, and track selection
- Xbuttons. The program window (and program mode) are dismissed via the Cancel
- Xbutton.
- X.LP
- X.SH COMMAND BUTTONS
- X.LP
- X.SS "Main Commands"
- X.IP "\fBplay\fP" 15
- XEnter play mode.
- X.IP "\fBpause\fP"
- XPause play. Activating this button has an effect on program selection.
- X.IP "\fBstop\fP"
- XStop disc and reset to beginning.
- X.IP "\fBprev\fP"
- XGo back either to the beginning of the previous track (or start of current
- Xtrack if more than replayThreshold seconds have elapsed); if in program
- Xmode, go to previous selection in program.
- X.IP "\fBnext\fP"
- XGo to beginning of next track; if in program mode, go to next program
- Xselection.
- X.IP "\fBeject\fP"
- XEject the disc. Resets all modes.
- X.IP "\fBaudio\fP"
- XToggle the audio output if possible. It will default to the best
- Xquality audio available (SGI only).
- X.IP "\fBquit\fP"
- XExit xcdplayer. (Leaves disc in last set state.
- X.IP "\fBcycle\fP"
- XCycle the disc. If in shuffle mode, reshuffle will occur at end of current
- Xshuffle; if in program mode, the program will replay.
- X.IP "\fBshuffle\fP"
- XSelect all of the tracks in random order. This button has no effect unless
- Xplay mode is not active, and is a toggle to program mode.
- X.IP "\fBrewind\fP"
- XRewind the disc. If held down, will continue rewinding. Scan skip amount
- Xand pause interval between skips are controlled by the resources
- XscanSkipInterval and scanPauseInterval. If the disc is paused, it will
- Xskip by the ammount specifed by pauseSkipInterval.
- X.IP "\fBfast-forward\fP"
- XAnalogous to rewind.
- X.IP "\fBprogram\fP"
- XEnter program mode. If paused, add current track (if not 0) to program.
- XBrings up program subwindow.
- X.LP
- X.SS "Program Commands"
- X.LP
- X.IP "\fBSelections\fP" 20
- XSelections displayed in the viewport of the program subwindow can be clicked
- Xon, and clicking on the currently selected track deletes it from the program.
- XThe highlighted selection indicates the current insert/delete point in the
- Xprogram, and if the CD is paused, clicking on a selection moves the program
- Xplay point to that selection.
- X.sp
- X.br
- XSelections can be added to the program either by clicking on
- Xthe track buttons on the program form, or by using the forward and previous
- Xbuttons on the main form while paused, and then clicking the program button
- Xagain. Pre-insertion before the 1st programmed track is allowed by clicking
- Xon the space preceding the 1st entry.
- X.IP "\fBClear\fP"
- XClears current program.
- X.IP "\fBCancel\fP"
- XClears current program and cancels program mode and subwindow.
- X.IP "\fBSave\fP"
- XSave the current program (if any) and current title to file in cdInfoDir.
- XThis file will then be read whenever the current disc is put into the player.
- X.IP "\fBtrack buttons\fP"
- XAdd the track number to the program at the current insertion point, or if
- Xactive, add track number to the programmable track button.
- X.IP "\fB+10\fP"
- XAdd ten to the programmable track button.
- X.IP "\fBprogrammable track\fP"
- XAdd the selected track number (if available on CD) to program at the current
- Xinsertion point.
- X.IP "\fBAll\fP"
- XReplace the current program with a sequential list of tracks on the CD.
- X.LP
- X.SS "Miscellaneous Commands"
- X.IP "\fBtrack\fP" 20
- XShow number of tracks on the CD.
- X.IP "\fBtimer\fP"
- XToggle between time elaped and time remaining. If in program mode, and not
- Xpaused, toggles to time remaining in program.
- X.IP "\fBvolume scroll\fP"
- XAdjust volume of CD player output.
- X.IP "\fBtitle\fP"
- XPop up dialog for editing title display. Title can then be associated
- Xpermanently with that CD by using the save button in the program subwindow.
- XThe title is displayed on a button in a viewport, so that long titles won't
- Xdistort the size of the tool.
- X
- X.SH FILES
- XcdInfoDir/cd.* these files contain title and stored program info saved for CDs
- X.SH SEE ALSO
- XX(1)
- X.SH LIMITATIONS
- XXcdplayer cannot yet read the current volume level and adjust the volume scroll
- Xaccordingly, because there is not current support for this in the driver.
- X.SH BUGS
- XXcdplayer occasionally "hangs" on a particular track, never quite reaching
- Xthe end of it. Advancing to the next or previous track, or pressing the
- Xstop button rectifies this condition.
- X.SH COPYRIGHT
- XCopyright (C) 1990 Regents of the University of California
- X.SH AUTHORS
- X.PP
- XRusty Wright
- X(rusty@belch.berkely.edu)
- X.br
- XWill Sadkin
- X(wsadkin@bbn.com)
- X.br
- XDan Rich
- X(drich@lerc.nasa.gov)
- X
- END_OF_FILE
- if test 6305 -ne `wc -c <'xcdplayer-2.2/xcdplayer.1'`; then
- echo shar: \"'xcdplayer-2.2/xcdplayer.1'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/xcdplayer.1'
- fi
- echo shar: End of archive 2 \(of 5\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 5 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 5 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- --
- Dan Rich | drich@lerc.nasa.gov | (216) 433-4000
- Sr. Systems Engineer | "Danger, you haven't seen the last of me!"
- RMS Technologies, Inc. | "No, but the first of you turns my stomach!"
- NASA Lewis Research Center | -- The Firesign Theatre's Nick Danger
-
-