*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> audiocddat/CDopen (3d)              
Title
Content
Arch
Section
 

Contents


CDopen(3dm)							   CDopen(3dm)


NAME    [Toc]    [Back]

     CDopen - opens a CD-ROM drive for audio use

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <dmedia/cdaudio.h>

     CDPLAYER* CDopen(char* dev, char* direction)

PARAMETER    [Toc]    [Back]

     dev	 The name of the devscsi file associated with the CD-ROM
		 device.  E.g.	/dev/scsi/sc0d4l0.  If dev is NULL, then
		 CDopen(3dm) will consult the hardware inventory table to
		 locate	a CD-ROM drive.

     direction	 A pointer to one of "r", "w", or "rw" indicating the
		 direction of the I/O desired.

RETURNED VALUE    [Toc]    [Back]

     Upon successful completion, CDopen(3dm) returns a pointer to a CDPLAYER,
     an	opaque type defined in cdaudio.h. Otherwise a value of null (0)	is
     returned and errno	is set to indicate the error.

DESCRIPTION    [Toc]    [Back]

     CDopen(3dm) opens the devscsi device associated with the CD-ROM and
     determines	if the device is a recognized type of CD-ROM drive.
     Recognized	devices	are Sony and Toshiba. If it is successful it allocates
     and initializes a CDPLAYER	structure for the device and returns a pointer
     to	it.  You use this structure in all function calls that access the CDROM.


     The device	is opened for reading, writing,	or reading and writing
     according to the direction	argument.  Currently only reading is
     supported.	 This argument provides	a path forward toward writable CD's.
     CDopen(3dm) also attempts to select the CD-ROM mode that enables transfer
     of	audio data from	audio CD's across the SCSI bus.	 Only the Toshiba CDROM
 supports this feature.	 The scsi_audio	flag is	set in the CDSTATUS
     structure [see CDgetstatus(3dm)] to indicate whether the mode was
     successfully selected.  The opened	CD-ROM can be used as a	player
     regardless	of the success or failure of this operation.

     CDopen(3dm) will fail and no CDPLAYER structure will be created if	one or
     more of the following are true:


     [ENODEV]	    No CD-ROM device could be found.

     [ENODEV]	    The	device didn't respond to an inquiry request.

     [ENODEV]	    The	CD-ROM was of an unrecognized type.





									Page 1






CDopen(3dm)							   CDopen(3dm)



     [ENOMEM]	    The	malloc(3) call to acquire memory for the CDPLAYER
		    structure failed.

     [EBUSY]	    The	CD-ROM device was busy.

SEE ALSO    [Toc]    [Back]

      
      
     CDintro(3dm), CDclose(3dm), CDgetstatus(3dm), CDgettrackinfo(3dm),
     CDeject(3dm), CDreadda(3dm), CDseek(3dm), CDstop(3dm),
     CDtogglepause(3dm), CDallowremoval(3dm), CDpreventremoval(3dm),
     CDseek(3dm), CDseektrack(3dm), CDseekblock(3dm), CDplay(3dm),
     CDplayabs(3dm), CDplaytrack(3dm), CDplaytrackabs(3dm),

AUTHOR    [Toc]    [Back]

     Roger Chickering, Mark Callow


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
cdheadphone IRIX play audio CDs on a CD-ROM drive
CDstop IRIX stops play of an audio CD in CD-ROM drive
datman IRIX play and record audio tapes in DAT drive
DtMsgLogOpenFile HP-UX opens a log file
fdc OpenBSD SPARCstation floppy drive
CDgetstatus IRIX get current state of a CD-ROM drive
CDeject IRIX ejects the caddy from the CD-ROM drive
fd OpenBSD SPARCstation floppy drive
ripsock IRIX drive a PostScript rip via a TCP/IP socket
DtMmdbOpenInfoLib HP-UX opens an infolib for service
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service