diff --git a/patches/dmime-Dsound_Flags/0001-dmime-Do-not-pass-both-DSBCAPS_CTRLPAN-and-DSBCAPS_C.patch b/patches/dmime-Dsound_Flags/0001-dmime-Do-not-pass-both-DSBCAPS_CTRLPAN-and-DSBCAPS_C.patch new file mode 100644 index 00000000..9d0bdca8 --- /dev/null +++ b/patches/dmime-Dsound_Flags/0001-dmime-Do-not-pass-both-DSBCAPS_CTRLPAN-and-DSBCAPS_C.patch @@ -0,0 +1,42 @@ +From 51d8680f294c62391912f9e7b47bdb794683e764 Mon Sep 17 00:00:00 2001 +From: Michael Stefaniuc +Date: Sat, 9 Jan 2016 22:44:10 +0100 +Subject: dmime: Do not pass both DSBCAPS_CTRLPAN and DSBCAPS_CTRL3D to dsound. + +--- + dlls/dmime/performance.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c +index 38f68db..8b5d3e2 100644 +--- a/dlls/dmime/performance.c ++++ b/dlls/dmime/performance.c +@@ -1035,7 +1035,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire + + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); +- desc.dwFlags = DSBCAPS_CTRLFX | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_GLOBALFOCUS; ++ desc.dwFlags = DSBCAPS_CTRLFX | DSBCAPS_CTRLVOLUME | DSBCAPS_GLOBALFOCUS; + desc.dwBufferBytes = DSBSIZE_MIN; + desc.dwReserved = 0; + desc.lpwfxFormat = &format; +@@ -1046,14 +1046,14 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire + desc.dwFlags |= DSBCAPS_CTRL3D | DSBCAPS_CTRLFREQUENCY | DSBCAPS_MUTE3DATMAXDISTANCE; + break; + case DMUS_APATH_DYNAMIC_MONO: +- desc.dwFlags |= DSBCAPS_CTRLFREQUENCY; ++ desc.dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY; + break; + case DMUS_APATH_SHARED_STEREOPLUSREVERB: + /* normally we have to create 2 buffers (one for music other for reverb) + * in this case. See msdn + */ + case DMUS_APATH_DYNAMIC_STEREO: +- desc.dwFlags |= DSBCAPS_CTRLFREQUENCY; ++ desc.dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY; + format.nChannels = 2; + format.nBlockAlign *= 2; + format.nAvgBytesPerSec *=2; +-- +2.6.4 + diff --git a/patches/dmime-Dsound_Flags/definition b/patches/dmime-Dsound_Flags/definition new file mode 100644 index 00000000..09bb3f88 --- /dev/null +++ b/patches/dmime-Dsound_Flags/definition @@ -0,0 +1 @@ +Fixes: [39958] Fix regression caused by passing invalid flag combination to dsound8 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 1b820ab7..30e88a91 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -128,6 +128,7 @@ patch_enable_all () enable_ddraw_d3d_execute_buffer="$1" enable_dinput_DIPROP_USERNAME="$1" enable_dinput_Initialize="$1" + enable_dmime_Dsound_Flags="$1" enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" enable_dsound_Revert_Cleanup="$1" @@ -502,6 +503,9 @@ patch_enable () dinput-Initialize) enable_dinput_Initialize="$2" ;; + dmime-Dsound_Flags) + enable_dmime_Dsound_Flags="$2" + ;; dsound-EAX) enable_dsound_EAX="$2" ;; @@ -2950,6 +2954,21 @@ if test "$enable_dinput_Initialize" -eq 1; then ) >> "$patchlist" fi +# Patchset dmime-Dsound_Flags +# | +# | This patchset fixes the following Wine bugs: +# | * [#39958] Fix regression caused by passing invalid flag combination to dsound8 +# | +# | Modified files: +# | * dlls/dmime/performance.c +# | +if test "$enable_dmime_Dsound_Flags" -eq 1; then + patch_apply dmime-Dsound_Flags/0001-dmime-Do-not-pass-both-DSBCAPS_CTRLPAN-and-DSBCAPS_C.patch + ( + echo '+ { "Michael Stefaniuc", "dmime: Do not pass both DSBCAPS_CTRLPAN and DSBCAPS_CTRL3D to dsound.", 1 },'; + ) >> "$patchlist" +fi + # Patchset dsound-Fast_Mixer # | # | This patchset fixes the following Wine bugs: