rusty@BELCH.BERKELEY.EDU (Rusty Wright) (01/02/91)
Please respond via email; I read news infrequently. I have an audio cd of sounds and it isn't copyrighted (i.e., it's made to be copied and used in other stuff) and I'd like to be able to read the audio samples off of it. The cdromio(4s) manual page hints that one might be able to read an audio cd via the USCSICMD ioctl but doesn't give any specifics (a polite description of the cdromio(4s) manual page would be "sketchy"). Does anybody know how to do this or have code to do it that they could send me? Also, I wrote a simple X program using the Athena widgets to control the cd drive to play audio discs (you can listen to them via the headphone jack on the font of the unit). It has buttons for play, stop, pause, fast forward (jump to next song), rewind (jump to previous song), and a window that displays the current track. While writing it I think I found a bug in either the driver or the hardware. One of the ioctls allows you to find out how far into the current track the drive currently is. I use this to set an X timer event in order to update my "current track" window (determine how much time is left, set a timer to go off at that time, and then when it goes off update the label in the current track window). On some discs, when you use this ioctl immediately after using the play ioctl you get garbage (which is what I do when you click on the play button; thereafter it sets the timer from the time that's in the table of contents on the disk [available via yet another ioctl]). It happens consistently, but not always, on the same track/song as well. I wish that on certain (hardware) events e.g., disc ejected, starting next track, etc., the driver had the capability to send signals back to the user (at the user's request via an ioctl), for example, via SIGIO.