Alexandre Julliard pushed to branch master at wine / wine
Commits: 08424dd4 by Giovanni Mascellani at 2025-11-14T18:04:35+01:00 mmdevapi/tests: Check that IsFormatSupported() sets the format to NULL when it returns E_POINTER.
- - - - - 6ee01903 by Giovanni Mascellani at 2025-11-14T18:04:35+01:00 mmdevapi: Move format validation in driver-independent code.
The formal validation of the audio format is the same for all drivers, there is no point having duplicated and different validation code in each driver.
The code I copied here is from the Pulse driver, which looks the most complete. It probably can be improved, but so far I'm just refactoring.
Not all driver-specific validation code is removed yet, because the suggested format output must be handled before.
- - - - - 18ce7964 by Giovanni Mascellani at 2025-11-14T18:04:35+01:00 mmdevapi: Move generating the suggested format in the driver-independent code.
According to the tests, it doesn't seem that the format suggested by IsFormatSupported() depends on the format supplied by the caller. It's just the mix format, so there is no need to have specialized handling for each driver.
- - - - -
8 changed files:
- dlls/mmdevapi/client.c - dlls/mmdevapi/tests/capture.c - dlls/mmdevapi/tests/render.c - dlls/mmdevapi/unixlib.h - dlls/winealsa.drv/alsa.c - dlls/winecoreaudio.drv/coreaudio.c - dlls/wineoss.drv/oss.c - dlls/winepulse.drv/pulse.c
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/188373813ac21a060cb93b4ae22baa...