Commit 195280be authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmime/tests: Add refcount test for generated dmusic/dsound.

parent 98f77c4f
......@@ -122,6 +122,18 @@ static HRESULT test_InitAudio(void)
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
destroy_performance(performance, NULL, NULL);
/* Refcounts for auto generated dmusic and dsound */
create_performance(&performance, NULL, NULL, FALSE);
dmusic = NULL;
dsound = NULL;
hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, &dsound, NULL, 0, 64, 0, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
ref = get_refcount(dsound);
todo_wine ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
ref = get_refcount(dmusic);
ok(ref == 2, "dmusic ref count got %d expected 2\n", ref);
destroy_performance(performance, NULL, NULL);
/* dsound without SetCooperativeLevel() */
create_performance(&performance, NULL, &dsound, FALSE);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, &dsound, NULL, 0, 0, 0, NULL);
......
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