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