[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
       CD_INFO -- Return information/status of device

   IO REQUEST
       io_Device       preset by the call to opendevice()
       io_Unit         preset by the call to opendevice()
       io_Command      CD_INFO
       io_Data         pointer to cdinfo structure
       io_Length       sizeof(struct CDInfo)

   RESULTS
       io_Error        0 for success, or an error code as defined in
                       <devices/cd.h>
       io_Actual       length of data transferred

   FUNCTION

       This command returns current configurations and status of the device
       driver.

   EXAMPLE

       struct cdinfo info;

       ior->io_Command = CD_INFO;               /* Retrieve drive info.    */
       ior->io_Data    = (APTR)Info;            /* Here's where we want it */
       ior->io_Length  = sizeof(struct CDInfo); /* Return whole structure  */
       DoIO(ior);

       if (!ior->io_Error) {                    /* Command succeeded       */

           if (Info.Status & CDSTSF_PLAYING) printf("Audio is playingn");
           else                              printf("Audio not playingn");
           }

   NOTES

   BUGS

   SEE ALSO
       <devices/cd.h>