Alistair Leslie-Hughes (@alesliehughes) commented about dlls/xactengine3_7/tests/xact3.c:
- filename = load_resource(L"test.xwb");
- file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
- ok(file != INVALID_HANDLE_VALUE, "Cannot open file\n");
- streaming_params.file = file;
- streaming_params.packetSize = 0x800;
- hr = IXACT3Engine_CreateStreamingWaveBank(engine, &streaming_params, ¬ification_data.wave_bank);
- ok(hr == S_OK, "Cannot create a streaming wave bank, hr %#lx\n", hr);
- for (i = 0; i < 10 && !notification_data.received; i++)
- {
IXACT3Engine_DoWork(engine);
Sleep(1);
- }
This really shouldn't be a loop.
Though more work, it should be a thread with events to detect when the notification(s) have occurred.