CDPLAY - 4


// -

// ---------------------------------------------------

int PlayAudioTrack(DWORD dwLoc, DWORD dwSectorNum, int nCDUnit)

{

PlayAudio cmd;

memset(&cmd, 0, sizeof(PlayAudio));

cmd.rh.bSize = 22;

cmd.rh.bSubUnit = 0;

cmd.rh.bCmd = 132;

cmd.bMode = 0;

cmd.dwLoc = dwLoc;

cmd.dwSectorNum = dwSectorNum;

CallCDDriver(&cmd, nCDUnit);

return cmd.rh.wStatus;

}

// ---------------------------------------------------

// StopAudio

// -

// ---------------------------------------------------

int StopAudio(int nCDUnit)

{

ReqHdr cmd;

memset(&cmd, 0, sizeof(ReqHdr));

cmd.bSize = 13;

cmd.bSubUnit = 0;

cmd.bCmd = 133;

CallCDDriver(&cmd, nCDUnit);

return (cmd.wStatus);

}

// ---------------------------------------------------

// DeviceOpen

//

// ---------------------------------------------------

int DeviceOpen(int nCDUnit)

{

ReqHdr cmd;

memset(&cmd, 0, sizeof(ReqHdr));

cmd.bSize = 13;

cmd.bSubUnit = 0;

cmd.bCmd = 13;

CallCDDriver(&cmd, nCDUnit);

return (cmd.wStatus);

}

// ---------------------------------------------------

// DeviceClose

//

// ---------------------------------------------------

int DeviceClose(int nCDUnit)

{

ReqHdr cmd;

memset(&cmd, 0, sizeof(ReqHdr));

cmd.bSize = 13;

cmd.bSubUnit = 0;

cmd.bCmd = 14;

CallCDDriver(&cmd, nCDUnit);

return (cmd.wStatus);

}

// ---------------------------------------------------

// EjectCD

// -

// ---------------------------------------------------

int EjectCD(int nCDUnit)

{

IOCTL_Output cmd;

EjectDisk ed;

memset(&cmd, 0, sizeof(IOCTL_Output));

cmd.rh.bSize = 14;

cmd.rh.bSubUnit = 0;

cmd.rh.bCmd = 12;