Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ CDgetstatus(3dm) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

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)



CDgetstatus(3dm)                                              CDgetstatus(3dm)



NAME
     CDgetstatus - get current state of a CD-ROM drive

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

     int CDgetstatus(CDPLAYER* cd, CDSTATUS* status)

PARAMETERS
     cd       A pointer to the CDPLAYER structure representing the target CD-
              ROM drive.

     status   A pointer to the CDSTATUS structure to be filled in.

RETURNED VALUE
     If successful, this function returns a non-zero value otherwise zero is
     returned.

DESCRIPTION
     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.

WARNING
     The CDgetstatus function should not be used in conjunction with the
     CDreadda(3dm) function.

SEE ALSO
     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)

AUTHOR
     Roger Chickering, Mark Callow


























                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026