winecoreaudio: Ignore failure to notify MIDI clients.
This commit is contained in:
parent
abf29377ba
commit
945588a302
|
@ -222,7 +222,7 @@ LONG CoreAudio_MIDIRelease(void)
|
|||
/**************************************************************************
|
||||
* MIDI_NotifyClient [internal]
|
||||
*/
|
||||
static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
|
||||
static void MIDI_NotifyClient(UINT wDevID, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
DWORD dwCallBack;
|
||||
UINT uFlags;
|
||||
|
@ -255,12 +255,11 @@ static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg, DWORD dwParam1, DWORD dwP
|
|||
dwInstance = sources[wDevID].midiDesc.dwInstance;
|
||||
break;
|
||||
default:
|
||||
WARN("Unsupported MSW-MIDI message %u\n", wMsg);
|
||||
return MMSYSERR_ERROR;
|
||||
ERR("Unsupported MSW-MIDI message %u\n", wMsg);
|
||||
return;
|
||||
}
|
||||
|
||||
return DriverCallback(dwCallBack, uFlags, hDev, wMsg, dwInstance, dwParam1, dwParam2) ?
|
||||
MMSYSERR_NOERROR : MMSYSERR_ERROR;
|
||||
DriverCallback(dwCallBack, uFlags, hDev, wMsg, dwInstance, dwParam1, dwParam2);
|
||||
}
|
||||
|
||||
static DWORD MIDIOut_Open(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
||||
|
@ -307,7 +306,8 @@ static DWORD MIDIOut_Open(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
|||
dest->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
|
||||
dest->midiDesc = *lpDesc;
|
||||
|
||||
return MIDI_NotifyClient(wDevID, MOM_OPEN, 0L, 0L);
|
||||
MIDI_NotifyClient(wDevID, MOM_OPEN, 0L, 0L);
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static DWORD MIDIOut_Close(WORD wDevID)
|
||||
|
@ -327,10 +327,7 @@ static DWORD MIDIOut_Close(WORD wDevID)
|
|||
destinations[wDevID].graph = 0;
|
||||
destinations[wDevID].synth = 0;
|
||||
|
||||
if (MIDI_NotifyClient(wDevID, MOM_CLOSE, 0L, 0L) != MMSYSERR_NOERROR) {
|
||||
WARN("can't notify client !\n");
|
||||
ret = MMSYSERR_INVALPARAM;
|
||||
}
|
||||
MIDI_NotifyClient(wDevID, MOM_CLOSE, 0L, 0L);
|
||||
destinations[wDevID].midiDesc.hMidi = 0;
|
||||
|
||||
return ret;
|
||||
|
@ -446,10 +443,7 @@ static DWORD MIDIOut_LongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
|||
|
||||
lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
|
||||
lpMidiHdr->dwFlags |= MHDR_DONE;
|
||||
if (MIDI_NotifyClient(wDevID, MOM_DONE, (DWORD)lpMidiHdr, 0L) != MMSYSERR_NOERROR) {
|
||||
WARN("can't notify client !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
MIDI_NotifyClient(wDevID, MOM_DONE, (DWORD)lpMidiHdr, 0L);
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
|
@ -632,7 +626,8 @@ static DWORD MIDIIn_Open(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
|||
sources[wDevID].startTime = 0;
|
||||
sources[wDevID].state = 0;
|
||||
|
||||
return MIDI_NotifyClient(wDevID, MIM_OPEN, 0L, 0L);
|
||||
MIDI_NotifyClient(wDevID, MIM_OPEN, 0L, 0L);
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static DWORD MIDIIn_Close(WORD wDevID)
|
||||
|
@ -654,7 +649,7 @@ static DWORD MIDIIn_Close(WORD wDevID)
|
|||
return MIDIERR_STILLPLAYING;
|
||||
}
|
||||
|
||||
ret = MIDI_NotifyClient(wDevID, MIM_CLOSE, 0L, 0L);
|
||||
MIDI_NotifyClient(wDevID, MIM_CLOSE, 0L, 0L);
|
||||
sources[wDevID].midiDesc.hMidi = 0;
|
||||
return ret;
|
||||
}
|
||||
|
@ -814,9 +809,7 @@ static DWORD MIDIIn_Reset(WORD wDevID)
|
|||
sources[wDevID].lpQueueHdr->dwFlags &= ~MHDR_INQUEUE;
|
||||
sources[wDevID].lpQueueHdr->dwFlags |= MHDR_DONE;
|
||||
/* FIXME: when called from 16 bit, lpQueueHdr needs to be a segmented ptr */
|
||||
if (MIDI_NotifyClient(wDevID, MIM_LONGDATA, (DWORD)sources[wDevID].lpQueueHdr, dwTime) != MMSYSERR_NOERROR) {
|
||||
WARN("Couldn't notify client\n");
|
||||
}
|
||||
MIDI_NotifyClient(wDevID, MIM_LONGDATA, (DWORD)sources[wDevID].lpQueueHdr, dwTime);
|
||||
sources[wDevID].lpQueueHdr = (LPMIDIHDR)sources[wDevID].lpQueueHdr->lpNext;
|
||||
}
|
||||
LeaveCriticalSection(&midiInLock);
|
||||
|
|
Loading…
Reference in New Issue