When `GetMixFormat` or `GetDevicePeriod` are used, return values specific to the selected device instead of those of the default one.
This is especially useful when the audio devices features less channels than one specifically selected by the application.
This patch is part of an attempt to get Sony's DualSense controllers to work with Windows games through Wine. This is not enough by itself, but getting the proper mix format is required for most of those games to correctly use the haptic feedback features of the DualSense (which go through an audio output with 4 audio devices).
--
v9: winepulse.drv: don't probe default devices twice
winepulse.drv: do not fallback to global periods in pulse_get_device_period
winepulse.drv: do not fallback to global pulse_fmt in pulse_get_mix_format
winepulse.drv: use stream-specific period in pulse_get_latency
winepulse.drv: store and use device period on stream creation
https://gitlab.winehq.org/wine/wine/-/merge_requests/337
Instead of querying all properties and then matching to requested one,
first check if all requested properties are supported by given class.
Then select just that subset.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/371