mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 14:24:07 +00:00
sapi: Implement ISpMMSysAudio::EventHandle.
This commit is contained in:
parent
ef730b6e41
commit
7cd77b2a78
|
@ -728,9 +728,11 @@ static HRESULT WINAPI mmsysaudio_GetDefaultFormat(ISpMMSysAudio *iface, GUID *gu
|
|||
|
||||
static HANDLE WINAPI mmsysaudio_EventHandle(ISpMMSysAudio *iface)
|
||||
{
|
||||
FIXME("(%p): stub.\n", iface);
|
||||
struct mmaudio *This = impl_from_ISpMMSysAudio(iface);
|
||||
|
||||
return NULL;
|
||||
TRACE("(%p).\n", iface);
|
||||
|
||||
return This->event;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mmsysaudio_GetVolumeLevel(ISpMMSysAudio *iface, ULONG *level)
|
||||
|
|
|
@ -167,6 +167,8 @@ static void test_audio_out(void)
|
|||
UINT devid;
|
||||
char *buf = NULL;
|
||||
ULONG written;
|
||||
DWORD start, end;
|
||||
HANDLE event = NULL;
|
||||
HRESULT hr;
|
||||
|
||||
if (waveOutGetNumDevs() == 0) {
|
||||
|
@ -258,6 +260,20 @@ static void test_audio_out(void)
|
|||
ok(hr == S_OK, "got %#lx.\n", hr);
|
||||
ok(written == wfx->nAvgBytesPerSec * 200 / 1000, "got %lu.\n", written);
|
||||
|
||||
hr = ISpMMSysAudio_Write(mmaudio, buf, wfx->nAvgBytesPerSec * 200 / 1000, NULL);
|
||||
ok(hr == S_OK, "got %#lx.\n", hr);
|
||||
|
||||
start = GetTickCount();
|
||||
|
||||
event = ISpMMSysAudio_EventHandle(mmaudio);
|
||||
ok(event != NULL, "event == NULL.\n");
|
||||
|
||||
hr = WaitForSingleObject(event, 1000);
|
||||
ok(hr == WAIT_OBJECT_0, "got %#lx.\n", hr);
|
||||
|
||||
end = GetTickCount();
|
||||
ok(end - start <= 500, "waited for %lu ms.\n", end - start);
|
||||
|
||||
hr = ISpMMSysAudio_SetState(mmaudio, SPAS_CLOSED, 0);
|
||||
ok(hr == S_OK, "got %#lx.\n", hr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue