CDgetstatus(3dm) CDgetstatus(3dm)
CDgetstatus - get current state of a CD-ROM drive
#include <sys/types.h>
#include <dmedia/cdaudio.h>
int CDgetstatus(CDPLAYER* cd, CDSTATUS* status)
cd A pointer to the CDPLAYER structure representing the target CDROM
drive.
status A pointer to the CDSTATUS structure to be filled in.
If successful, this function returns a non-zero value otherwise zero is
returned.
CDgetstatus(3dm) fills in the status structure with values pertaining to
the current state of the CD-ROM drive. CDSTATUS is defined in cdaudio.h
as follows:
typedef struct {
int state;
int track;
int min; /* relative to beginning of track */
int sec;
int frame;
int abs_min; /* relative to beginning of disc */
int abs_sec;
int abs_frame;
int total_min; /* total on disc */
int total_sec;
int total_frame;
int first; /* first legal track number */
int last; /* last legal track number */
int scsi_audio; /* true if drive can xfer audio data */
int cur_block; /* block no. for next audio data read */
int polyfilla[3]; /* future expansion */
} CDSTATUS;
state takes on one of the following values defined in cdaudio.h:
CD_READY, CD_NODISC, CD_CDROM, CD_ERROR, CD_PLAYING, CD_PAUSED, or
CD_STILL.
The various states are as follows:
Page 1
CDgetstatus(3dm) CDgetstatus(3dm)
CD_READY The drive is ready for operation loaded with an audio CD.
CD_NODISC The drive does not have a CD loaded.
CD_CDROM The drive is loaded with a CD-ROM. Subsequent play or read
operations will return I/O errors.
CD_ERROR An error occurred while trying to read the disc or its table
of contents.
CD_PLAYING The drive is in CD player mode playing an audio CD through
its audio jacks.
CD_PAUSED The drive is in CD player mode with play paused.
CD_STILL The equivalent of CD_PAUSE on older (pre 3301) model Toshiba
CD-ROM drives. Such drives have never been shipped by SGI.
The CDgetstatus function should not be used in conjunction with the
CDreadda(3dm) function.
CDintro(3dm), CDclose(3dm), CDgetstatus(3dm), CDgettrackinfo(3dm),
CDeject(3dm), CDopen(3dm), CDplay(3dm), CDplayabs(3dm), CDplaytrack(3dm),
CDplaytrackabs(3dm), CDreadda(3dm), CDstop(3dm), CDtogglepause(3dm)
Roger Chickering, Mark Callow
PPPPaaaaggggeeee 2222 [ Back ]
|