Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 195 of file lolvldrv.c.
Referenced by midiInOpen(), midiOutOpen(), midiStreamOpen(), mixerOpen(), MMDRV_Open(), and WAVE_Open().
{ DWORD dwRet = MMSYSERR_BADDEVICEID; DWORD_PTR dwInstance; WINE_LLTYPE* llType = &llTypes[mld->type]; TRACE("(%p, %04x, 0x%08lx, 0x%08x)\n", mld, wMsg, dwParam1, dwFlags); mld->dwDriverInstance = (DWORD_PTR)&dwInstance; if (mld->uDeviceID == (UINT)-1 || mld->uDeviceID == (UINT16)-1) { TRACE("MAPPER mode requested !\n"); /* check if mapper is supported by type */ if (llType->bSupportMapper) { if (llType->nMapper == -1) { /* no driver for mapper has been loaded, try a dumb implementation */ TRACE("No mapper loaded, doing it by hand\n"); for (mld->uDeviceID = 0; mld->uDeviceID < llType->wMaxId; mld->uDeviceID++) { if ((dwRet = MMDRV_Open(mld, wMsg, dwParam1, dwFlags)) == MMSYSERR_NOERROR) { /* to share this function epilog */ dwInstance = mld->dwDriverInstance; break; } } } else { mld->uDeviceID = (UINT16)-1; mld->mmdIndex = llType->lpMlds[-1].mmdIndex; TRACE("Setting mmdIndex to %u\n", mld->mmdIndex); dwRet = MMDRV_Message(mld, wMsg, dwParam1, dwFlags); } } } else { if (mld->uDeviceID < llType->wMaxId) { mld->mmdIndex = llType->lpMlds[mld->uDeviceID].mmdIndex; TRACE("Setting mmdIndex to %u\n", mld->mmdIndex); dwRet = MMDRV_Message(mld, wMsg, dwParam1, dwFlags); } } if (dwRet == MMSYSERR_NOERROR) mld->dwDriverInstance = dwInstance; return dwRet; }