GETCDHAND
typedef struct _GETCDHAND
{
BYTE size;
BYTE ver;
BYTE ha;
BYTE tgt;
BYTE lun;
BYTE readType;
BOOL jitterCorr;
BYTE numJitter;
BYTE numOverlap; // was previously numSave
} PACKED GETCDHAND, *PGETCDHAND, FAR *LPGETCDHAND;
Note: numSave from the original version of the documentation has been changed to numOverlap.
Description: Used by the function GetCDHandle to specify the CD-ROM unit to be opened, and specific parameters.
Members:
size |
Size of the GETCDHAND structure. Must be set to sizeof(GETCDHAND). |
ver |
Version of AKRip32 dll. Should be set to 1 as of this release. |
ha |
Host adapter number of CD-ROM unit |
tgt |
Target number of CD-ROM unit |
lun |
LUN of CD-ROM unit |
readType |
Read algorithm to use: can be one of CDR_ANY, CDR_ATAPI1, CDR_ATAPI2, CDR_READ10, CDR_READ_D8, CDR_READ_D4 or CDR_READ_D4_1 |
jitterCorr |
Ignored by the current implementation |
numJitter |
The number of frames to check. Only affects ReadCDAudioLBAEx. |
numOverlap |
The number of frames to overlap. Only affects ReadCDAudioLBAEx. |
Notes: readType should be set to represent the type of CD Rom present on the system. To attempt to autodetect the proper read function, select CDR_ANY. For IDE drives (or SCSI drives that support MMC-2), you should almost always select CDR_ATAPI1 or CDR_ATAPI2. For SCSI drives, it will vary according to the specific drive.
If you will be using jitter correction with ReadCDAudioLBAEx, you will want to set the numJitter and numOverlap values appropriately. numOverlap is the number of frames that will be reread ("overlapped"), and numJitter is the number of frames that will be matched in the overlapped area. If you will be using jitter correction, the following must be true: numOverlap >= numJitter + 2.
Example usage: The following code attempts to get a handle to the first CD-ROM unit on the system, expecting to perform jitter correction
HCDROM hCD;
CDLIST cdl;
GETCDHAND gcd;
memset( &cdl, 0, sizeof(cdl) );
cdl.max = MAXCDLIST;
GetCDList( &cdl );
memset( &gcd, 0, sizeof(gcd) );
gcd.size = sizeof(gcd);
gcd.ver = 1;
gcd.ha = cdl.cd[0].ha;
gcd.tgt = cdl.cd[0].tgt;
gcd.lun = cdl.cd[0].lun;
gcd.readType = CDR_ANY;
gcd.numJitter = 1;
gcd.numOverlap = 3;
hCD = GetCDHandle( &gcd );
See also: GetCDHandle, ReadCDAudioLBAEx