#7935 closed patch (duplicate)
GDI Port: CD Audio playing patch
Reported by: | SF/mcleod2032 | Owned by: | SF/ender |
---|---|---|---|
Priority: | normal | Component: | Port: Win32 |
Version: | Keywords: | ||
Cc: | Game: |
Description
This is the code to playing CD Audio under GDI Port:
void cd_playtrack(int track, int offset, int delay) { UINT wDeviceID; DWORD dwReturn; MCI_OPEN_PARMS mciOpenParms; MCI_SET_PARMS mciSetParms; MCI_PLAY_PARMS mciPlayParms; int start, end;
start = (offset / 24); end = (start + delay / 24);
mciOpenParms.lpstrDeviceType = "cdaudio"; if (dwReturn = mciSendCommand(NULL, MCI_OPEN, MCI_OPEN_TYPE, (DWORD)(LPVOID) &mciOpenParms)) return;
wDeviceID = mciOpenParms.wDeviceID; mciSetParms.dwTimeFormat = MCI_FORMAT_TMSF; if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID) &mciSetParms)) { mciSendCommand(wDeviceID, MCI_CLOSE, 0, NULL); return; }
mciPlayParms.dwFrom = MCI_MAKE_TMSF(track, start / 60, start % 60, 0); mciPlayParms.dwTo = MCI_MAKE_TMSF(track, end / 60, end % 60, 0);
if (dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_FROM | MCI_TO | MCI_NOTIFY | MCI_TRACK, (DWORD)(LPVOID) &mciPlayParms)) mciSendCommand(wDeviceID, MCI_CLOSE, 0, NULL); }
Ticket imported from: #523152. Ticket imported from: patches/40.
Change History (6)
comment:1 by , 23 years ago
Summary: | GDI Port: CD Audio playinf patch → GDI Port: CD Audio playing patch |
---|
comment:2 by , 23 years ago
Owner: | set to |
---|
comment:3 by , 23 years ago
Status: | new → closed |
---|
comment:4 by , 23 years ago
Resolution: | → duplicate |
---|
comment:5 by , 23 years ago
comment:6 by , 6 years ago
Component: | → Port: Win32 |
---|
Supercided by GDI patch.