Skip to content

Commit

Permalink
dmusic/tests: Fixup chunk alignment in steam_end_chunk.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbernon authored and julliard committed Sep 20, 2023
1 parent 4ea18f8 commit b6f1a1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dlls/dmusic/tests/dmusic.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,36 @@ static void stream_end_chunk(IStream *stream, ULARGE_INTEGER *offset)
ok(hr == S_OK, "got %#lx\n", hr);
hr = IStream_Seek(stream, *(LARGE_INTEGER *)&position, STREAM_SEEK_SET, NULL);
ok(hr == S_OK, "got %#lx\n", hr);
hr = IStream_Write(stream, &zero, (position.QuadPart & 1), NULL);
ok(hr == S_OK, "got %#lx\n", hr);
}

#define CHUNK_BEGIN(stream, type) \
do { \
ULARGE_INTEGER __off; \
IStream *__stream = (stream); \
stream_begin_chunk(stream, type, &__off); \
do

#define CHUNK_RIFF(stream, form) \
do { \
ULARGE_INTEGER __off; \
IStream *__stream = (stream); \
stream_begin_chunk(stream, "RIFF", &__off); \
IStream_Write(stream, form, 4, NULL); \
do

#define CHUNK_LIST(stream, form) \
do { \
ULARGE_INTEGER __off; \
IStream *__stream = (stream); \
stream_begin_chunk(stream, "LIST", &__off); \
IStream_Write(stream, form, 4, NULL); \
do

#define CHUNK_END \
while (0); \
stream_end_chunk(stream, &__off); \
stream_end_chunk(__stream, &__off); \
} while (0)

#define CHUNK_DATA(stream, type, data) \
Expand Down

0 comments on commit b6f1a1a

Please sign in to comment.