Commit 086883e8 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed returned type upon open.

Fixed some bogus error checking.
parent 9000e7f2
...@@ -40,7 +40,7 @@ static DWORD CDAUDIO_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp) ...@@ -40,7 +40,7 @@ static DWORD CDAUDIO_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
wmcda->wDevID = modp->wDeviceID; wmcda->wDevID = modp->wDeviceID;
mciSetDriverData(wmcda->wDevID, (DWORD)wmcda); mciSetDriverData(wmcda->wDevID, (DWORD)wmcda);
modp->wCustomCommandTable = MCI_NO_COMMAND_TABLE; modp->wCustomCommandTable = MCI_NO_COMMAND_TABLE;
modp->wType = MCI_DEVTYPE_SEQUENCER; modp->wType = MCI_DEVTYPE_CD_AUDIO;
return modp->wDeviceID; return modp->wDeviceID;
} }
...@@ -229,7 +229,7 @@ static DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpOpe ...@@ -229,7 +229,7 @@ static DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpOpe
} }
if (dwFlags & MCI_OPEN_ELEMENT) { if (dwFlags & MCI_OPEN_ELEMENT) {
TRACE("MCI_OPEN_ELEMENT !\n"); TRACE("MCI_OPEN_ELEMENT !\n");
/* return MCIERR_NO_ELEMENT_ALLOWED; */ return MCIERR_NO_ELEMENT_ALLOWED;
} }
wmcda->wNotifyDeviceID = dwDeviceID; wmcda->wNotifyDeviceID = dwDeviceID;
...@@ -241,7 +241,7 @@ static DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpOpe ...@@ -241,7 +241,7 @@ static DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpOpe
wmcda->dwTimeFormat = MCI_FORMAT_TMSF; wmcda->dwTimeFormat = MCI_FORMAT_TMSF;
if (!CDAUDIO_GetTracksInfo(&wmcda->wcda)) { if (!CDAUDIO_GetTracksInfo(&wmcda->wcda)) {
WARN("error reading TracksInfo !\n"); WARN("error reading TracksInfo !\n");
/* return MCIERR_INTERNAL; */ return MCIERR_INTERNAL;
} }
CDAUDIO_mciSeek(wDevID, MCI_SEEK_TO_START, &seekParms); CDAUDIO_mciSeek(wDevID, MCI_SEEK_TO_START, &seekParms);
...@@ -261,9 +261,6 @@ static DWORD CDAUDIO_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lp ...@@ -261,9 +261,6 @@ static DWORD CDAUDIO_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lp
if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID;
if (wmcda->nUseCount == 1) { if (wmcda->nUseCount == 1) {
/* FIXME: I don't think we have to stop CD on exit
* CDAUDIO_mciStop(wDevID, 0, NULL);
*/
CDAUDIO_Close(&wmcda->wcda); CDAUDIO_Close(&wmcda->wcda);
} }
wmcda->nUseCount--; wmcda->nUseCount--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment