There is another things that bothers me:
The while loop in parse_wave_form():
- WAVE file chunk order is fmt and then data
- The last fmt or data chunk will "win"; doubt there are any dmusic related WAVE files with duplicate fmt or data chunks.
But for now we can start with the while() loop:
- No clue where those extra chunks are placed
- We don't do anything with the WAV file; we just store it. Though we might run into memory issues with big WAV files.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2029#note_22349
Michael Stefaniuc (@mstefani) commented about dlls/dmime/segment.c:
> + case FOURCC_LIST: {
> + FIXME("Skipping LIST tag\n");
> + break;
> + }
> + case mmioFOURCC('I','S','F','T'): {
> + FIXME("Skipping ISFT tag\n");
> + break;
> + }
> + case mmioFOURCC('f','a','c','t'): {
> + FIXME("Skipping fact tag\n");
> + break;
> + }
> + }
> + }
> +
> + return S_OK;
The stream_next_chunk() in the while loop can fail too and you'll need to return that failure too.
S_FALSE indicates "no more chunks".
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2029#note_22348
Michael Stefaniuc (@mstefani) commented about dlls/dmime/segment.c:
>
> if (riff.type == DMUS_FOURCC_SEGMENT_FORM)
> hr = parse_segment_form(This, stream, &riff);
> - else {
> - FIXME("WAVE form loading not implemented\n");
> - hr = S_OK;
> - }
> + else
Please check that the RIFF has the proper type and add an else for the error case.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2029#note_22346
--
v5: tests: Test entry point semantics on function declarations.
tests: Add more tests for early return from the entry point.
tests: Add some tests for early return from user-defined functions.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/65
This informs the compiler that no code will ever run after an assertion
failure (unless NDEBUG is defined), which increases accuracy of compiler
warnings and static analyses.
--
v5: include/msvcrt: Add noreturn attribute to _assert.
include: Add noreturn attribute to RtlRaiseStatus.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2051