dotfiles/pkgs/osu-wine/patches/9989-misc-ps0126-devenum-Register-IEEE-float-for-Direct-Sound-defau.patch

37 lines
1.4 KiB
Diff
Raw Normal View History

2024-05-08 02:06:54 +07:00
commit d444330ed7685686f46db7fb8ed1ad0cbec72c7b
Author: Rémi Bernon <rbernon@codeweavers.com>
Date: Wed Jun 16 17:36:15 2021 +0200
Subject: [PATCH] devenum: Register IEEE float for Direct Sound default device.
--
diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c
index 8e9cf56eb09..97855b12b81 100644
--- a/dlls/devenum/createdevenum.c
+++ b/dlls/devenum/createdevenum.c
@@ -481,7 +481,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
static const WCHAR defaultW[] = L"Default DirectSound Device";
IPropertyBag *prop_bag = NULL;
REGFILTERPINS2 rgpins = {0};
- REGPINTYPES rgtypes = {0};
+ REGPINTYPES rgtypes[2] = {};
REGFILTER2 rgf = {0};
WCHAR clsid[CHARS_IN_GUID];
VARIANT var;
@@ -512,10 +512,12 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
rgf.rgPins2 = &rgpins;
rgpins.dwFlags = REG_PINFLAG_B_RENDERER;
/* FIXME: native registers many more formats */
- rgpins.nMediaTypes = 1;
- rgpins.lpMediaType = &rgtypes;
- rgtypes.clsMajorType = &MEDIATYPE_Audio;
- rgtypes.clsMinorType = &MEDIASUBTYPE_PCM;
+ rgpins.nMediaTypes = 2;
+ rgpins.lpMediaType = rgtypes;
+ rgtypes[0].clsMajorType = &MEDIATYPE_Audio;
+ rgtypes[0].clsMinorType = &MEDIASUBTYPE_PCM;
+ rgtypes[1].clsMajorType = &MEDIATYPE_Audio;
+ rgtypes[1].clsMinorType = &MEDIASUBTYPE_IEEE_FLOAT;
write_filter_data(prop_bag, &rgf);