Skip to content

Commit

Permalink
Fix compile error with tests
Browse files Browse the repository at this point in the history
Got some errors compiling tests with commit 03114a7 where
it seems as DATAFORMAT_SUBTYPE_PCM will be declared twice.
DATAFORMAT_SUBTYPE_PCM is already declared as "extern" in
FAudio.h for FAudioGUID.

The tests compile and run ok with this patch.
  • Loading branch information
SveSop authored and flibitijibibo committed Nov 18, 2020
1 parent 1978cb2 commit 0ba4e69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/xaudio2.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ static void test_simple_streaming(IXAudio2 *xa)
XA2CALL_V(UnregisterForCallbacks, &ecb);
}

static const GUID DATAFORMAT_SUBTYPE_PCM = {
FAudioGUID DATAFORMAT_SUBTYPE_PCM = {
0x01,
0x00,
0x10,
Expand Down Expand Up @@ -574,7 +574,7 @@ static UINT32 test_DeviceDetails(IXAudio27 *xa)
hr = IXAudio27_GetDeviceDetails(xa, i, &dd);
ok(hr == S_OK, "GetDeviceDetails failed: %08x\n", hr);

ok(!memcmp(&dd.OutputFormat.SubFormat, &DATAFORMAT_SUBTYPE_PCM, sizeof(GUID)),
ok(!memcmp(&dd.OutputFormat.SubFormat, &DATAFORMAT_SUBTYPE_PCM, sizeof(FAudioGUID)),
"Expected SubFormat of device at index %u to be MFAudioFormat_PCM. "
"Got {%8.8x-%4.4x-%4.4x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x}.\n", i,
dd.OutputFormat.SubFormat.Data1,
Expand Down

0 comments on commit 0ba4e69

Please sign in to comment.