a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Devices:
 cd.device
  CD_ADDCHANGEINT
  CD_ADDFRAMEINT
  CD_ATTENUATE
  CD_CHANGENUM
  CD_CHANGESTATE
  CD_CONFIG
  CD_EJECT
  CD_GETGEOMETRY
  CD_INFO
  CD_MOTOR
  CD_PAUSE
  CD_PLAYLSN
  CD_PLAYMSF
  CD_PLAYTRACK
  CD_PROTSTATUS
  CD_QCODELSN
  CD_QCODEMSF
  CD_READ
  CD_READXL
  CD_REMCHANGEINT
  CD_REMFRAMEINT
  CD_SEARCH
  CD_SEEK
  CD_TOCLSN
  CD_TOCMSF
  CloseDevice
  OpenDevice
Include
GuruMeditation
Docs » Autodocs » cd.device » CD_QCODEMSF

NAME

       CD_QCODEMSF -- Report current disk position.
IO REQUEST
io_Device preset by the call to OpenDevice()
io_Unit preset by the call to OpenDevice()
io_Command CD_QCODEMSF
io_Data pointer to QCode structure
io_Length 0 - MUST be zero (for future compatability)

RESULT

       io_Error        0 for success, or an error code as defined in
<devices/cd.h>

FUNCTION

       This command reports current subcode Q channel time information.  This
command only returns data when CD Audio is playing (or paused). At
any other time, an error is returned. The Q-Code packet consists of:
struct QCode {
UBYTE CtlAdr; /* Data type / QCode type */
UBYTE Track; /* Track number */
UBYTE Index; /* Track subindex number */
UBYTE Zero; /* The "Zero" byte of Q-Code packet */
union LSNMSF TrackPosition; /* Position from start of track */
union LSNMSF DiskPosition; /* Position from start of disk */
};

EXAMPLE

       struct QCode qcode;
ior->io_Command = CD_QCODEMSF; /* Retrieve TOC information */
ior->io_Length = 0; /* MUST be zero */
ior->io_Data = (APTR)qcode; /* Here's where we want it */
DoIO (ior);
if (!ior->io_Error) { /* Command succeeded */
printf("Current position is: %02d:%02d:%02d\n",
qcode.DiskPosition.MSF.Minute,
qcode.DiskPosition.MSF.Second,
qcode.DiskPosition.MSF.Frame);
}

NOTES

       This function may not return immediately.  It may take several frames
to pass by before a valid Q-Code packet can be returned. Use SendIO()
and CheckIO() if response time is critical, and the information is
not.

BUGS

SEE ALSO

CD_PLAYMSF(), CD_PLAYLSN(), CD_PLAYTRACK(), <devices/cd.h>

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Andromeda

ATX
PHA
TBL
AOA

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se