diff --git a/patches/dsound-EAX/0008-dsound-Add-EAX-init-and-free-stubs.patch b/patches/dsound-EAX/0008-dsound-Add-EAX-init-and-free-stubs.patch index f058d607..a41af6aa 100644 --- a/patches/dsound-EAX/0008-dsound-Add-EAX-init-and-free-stubs.patch +++ b/patches/dsound-EAX/0008-dsound-Add-EAX-init-and-free-stubs.patch @@ -1,28 +1,30 @@ -From f66f232de49f8fd3e14e8f328e16e89b83e7dcc8 Mon Sep 17 00:00:00 2001 +From b26a890a50b5c35d20c8f42993c4f578777584f0 Mon Sep 17 00:00:00 2001 From: Mark Harmstone Date: Fri, 27 Mar 2015 20:58:37 +0000 Subject: [PATCH] dsound: Add EAX init and free stubs. --- - dlls/dsound/buffer.c | 4 ++++ + dlls/dsound/buffer.c | 6 +++++- dlls/dsound/dsound_private.h | 2 ++ dlls/dsound/eax.c | 28 +++++++++++++++++++++++++++- - 3 files changed, 33 insertions(+), 1 deletion(-) + 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c -index 720bec9..7e9e478 100644 +index 22e1a713ee6..10daf4fa71a 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c -@@ -1104,6 +1104,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds +@@ -1131,7 +1131,9 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds + } else DSOUND_RecalcVolPan(&(dsb->volpan)); - RtlInitializeResource(&dsb->lock); +- InitializeSRWLock(&dsb->lock); ++ InitializeSRWLock(&dsb->lock); + if (dsb->device->eax.using_eax) + init_eax_buffer(dsb); /* register buffer */ err = DirectSoundDevice_AddBuffer(device, dsb); -@@ -1147,6 +1149,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This) +@@ -1174,6 +1176,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This) HeapFree(GetProcessHeap(), 0, This->filters); } @@ -32,10 +34,10 @@ index 720bec9..7e9e478 100644 TRACE("(%p) released\n", This); diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h -index e412533..6c90726 100644 +index 3b4c4f290a4..8dbb9edb594 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h -@@ -235,6 +235,8 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet, +@@ -234,6 +234,8 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet, HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet, ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData, ULONG cbPropData) DECLSPEC_HIDDEN; @@ -45,7 +47,7 @@ index e412533..6c90726 100644 /* mixer.c */ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len) DECLSPEC_HIDDEN; diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c -index 3931681..c0afb0f 100644 +index 3931681d295..c0afb0f1acf 100644 --- a/dlls/dsound/eax.c +++ b/dlls/dsound/eax.c @@ -92,20 +92,46 @@ static const EFXEAXREVERBPROPERTIES efx_presets[] = { @@ -97,5 +99,5 @@ index 3931681..c0afb0f 100644 HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet, -- -1.9.1 +2.17.1 diff --git a/patches/dsound-EAX/0018-dsound-Various-improvements-to-EAX-support.patch b/patches/dsound-EAX/0018-dsound-Various-improvements-to-EAX-support.patch index 0288f6b8..aff9b3f6 100644 --- a/patches/dsound-EAX/0018-dsound-Various-improvements-to-EAX-support.patch +++ b/patches/dsound-EAX/0018-dsound-Various-improvements-to-EAX-support.patch @@ -1,4 +1,4 @@ -From 630c89c7e41eb1cde6dd99bf5c3462d173236b3a Mon Sep 17 00:00:00 2001 +From 204a68de061f5b6b1bcd992e743b61c3f9f53956 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 4 Apr 2015 21:09:18 +0200 Subject: [PATCH] dsound: Various improvements to EAX support. @@ -20,14 +20,14 @@ the buffers). dlls/dsound/dsound.c | 2 ++ dlls/dsound/dsound_eax.h | 1 + dlls/dsound/dsound_private.h | 1 + - dlls/dsound/eax.c | 68 +++++++++++++++++++------------------------- + dlls/dsound/eax.c | 68 ++++++++++++++++-------------------- 5 files changed, 37 insertions(+), 41 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c -index 7e9e478..088a5e7 100644 +index 10daf4fa71a..25aaa61f3de 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c -@@ -1078,8 +1078,6 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds +@@ -1106,8 +1106,6 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds /* calculate fragment size and write lead */ DSOUND_RecalcFormat(dsb); @@ -36,7 +36,7 @@ index 7e9e478..088a5e7 100644 if (dsb->dsbd.dwFlags & DSBCAPS_CTRL3D) { dsb->ds3db_ds3db.dwSize = sizeof(DS3DBUFFER); dsb->ds3db_ds3db.vPosition.x = 0.0; -@@ -1165,7 +1163,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate( +@@ -1192,7 +1190,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate( HRESULT hres = DS_OK; TRACE("(%p,%p,%p)\n", device, ppdsb, pdsb); @@ -45,9 +45,9 @@ index 7e9e478..088a5e7 100644 if (dsb == NULL) { WARN("out of memory\n"); *ppdsb = NULL; -@@ -1202,6 +1200,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate( +@@ -1229,6 +1227,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate( - RtlInitializeResource(&dsb->lock); + InitializeSRWLock(&dsb->lock); + init_eax_buffer(dsb); /* FIXME: should we duplicate EAX properties? */ + @@ -55,12 +55,12 @@ index 7e9e478..088a5e7 100644 hres = DirectSoundDevice_AddBuffer(device, dsb); if (hres != DS_OK) { diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c -index 59e2fcd..13cda26 100644 +index 91fa94b943e..a0931325ebc 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c -@@ -181,6 +181,8 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice) +@@ -182,6 +182,8 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice) - RtlInitializeResource(&(device->buffer_list_lock)); + InitializeSRWLock(&device->buffer_list_lock); + init_eax_device(device); + @@ -68,7 +68,7 @@ index 59e2fcd..13cda26 100644 return DS_OK; diff --git a/dlls/dsound/dsound_eax.h b/dlls/dsound/dsound_eax.h -index a650108..a555a75 100644 +index a650108f570..a555a75e458 100644 --- a/dlls/dsound/dsound_eax.h +++ b/dlls/dsound/dsound_eax.h @@ -134,6 +134,7 @@ typedef struct { @@ -80,10 +80,10 @@ index a650108..a555a75 100644 float *SampleBuffer; diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h -index 6f8dddd..039154a 100644 +index 110dfe2c207..bca2bf46601 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h -@@ -235,6 +235,7 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet, +@@ -234,6 +234,7 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet, HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet, ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData, ULONG cbPropData) DECLSPEC_HIDDEN; @@ -92,7 +92,7 @@ index 6f8dddd..039154a 100644 void init_eax_buffer(IDirectSoundBufferImpl *dsb) DECLSPEC_HIDDEN; void process_eax_buffer(IDirectSoundBufferImpl *dsb, float *buf, DWORD count) DECLSPEC_HIDDEN; diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c -index a05b00e..e10156e 100644 +index a05b00e1c02..e10156e3d4a 100644 --- a/dlls/dsound/eax.c +++ b/dlls/dsound/eax.c @@ -114,6 +114,8 @@ static const float LATE_LINE_MULTIPLIER = 4.0f; @@ -253,5 +253,5 @@ index a05b00e..e10156e 100644 switch (dwPropID) { case DSPROPERTY_EAXBUFFER_ALL: -- -1.9.1 +2.17.1 diff --git a/patches/dsound-SRW/0001-dsound-Use-an-SRW-lock-for-buffer_list_lock.patch b/patches/dsound-SRW/0001-dsound-Use-an-SRW-lock-for-buffer_list_lock.patch deleted file mode 100644 index 7728a56b..00000000 --- a/patches/dsound-SRW/0001-dsound-Use-an-SRW-lock-for-buffer_list_lock.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 410d340084e24732e3d7423f74dbe8aa92dddd09 Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Thu, 9 Jan 2020 14:51:36 -0600 -Subject: [PATCH] dsound: Use an SRW lock for buffer_list_lock. - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48408 - -Signed-off-by: Zebediah Figura ---- - dlls/dsound/buffer.c | 4 ++-- - dlls/dsound/dsound.c | 15 +++++++-------- - dlls/dsound/dsound_private.h | 2 +- - dlls/dsound/mixer.c | 4 ++-- - dlls/dsound/primary.c | 4 ++-- - 5 files changed, 14 insertions(+), 15 deletions(-) - -diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c -index c61868a7820..82a23eb8907 100644 ---- a/dlls/dsound/buffer.c -+++ b/dlls/dsound/buffer.c -@@ -644,7 +644,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(IDirectSoundBuffer8 *iface, - - if (x1 || x2) - { -- RtlAcquireResourceShared(&This->device->buffer_list_lock, TRUE); -+ AcquireSRWLockShared(&This->device->buffer_list_lock); - LIST_FOR_EACH_ENTRY(iter, &This->buffer->buffers, IDirectSoundBufferImpl, entry ) - { - RtlAcquireResourceShared(&iter->lock, TRUE); -@@ -665,7 +665,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(IDirectSoundBuffer8 *iface, - } - RtlReleaseResource(&iter->lock); - } -- RtlReleaseResource(&This->device->buffer_list_lock); -+ ReleaseSRWLockShared(&This->device->buffer_list_lock); - } - - return hres; -diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c -index 4dcea9e29e9..e991210621f 100644 ---- a/dlls/dsound/dsound.c -+++ b/dlls/dsound/dsound.c -@@ -181,7 +181,7 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice) - InitializeCriticalSection(&(device->mixlock)); - device->mixlock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": DirectSoundDevice.mixlock"); - -- RtlInitializeResource(&(device->buffer_list_lock)); -+ InitializeSRWLock(&device->buffer_list_lock); - - init_eax_device(device); - -@@ -242,7 +242,6 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device) - HeapFree(GetProcessHeap(), 0, device->tmp_buffer); - HeapFree(GetProcessHeap(), 0, device->cp_buffer); - HeapFree(GetProcessHeap(), 0, device->buffer); -- RtlDeleteResource(&device->buffer_list_lock); - device->mixlock.DebugInfo->Spare[0] = 0; - DeleteCriticalSection(&device->mixlock); - HeapFree(GetProcessHeap(),0,device); -@@ -616,7 +615,7 @@ HRESULT DirectSoundDevice_AddBuffer( - - TRACE("(%p, %p)\n", device, pDSB); - -- RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE); -+ AcquireSRWLockExclusive(&device->buffer_list_lock); - - if (device->buffers) - newbuffers = HeapReAlloc(GetProcessHeap(),0,device->buffers,sizeof(IDirectSoundBufferImpl*)*(device->nrofbuffers+1)); -@@ -633,7 +632,7 @@ HRESULT DirectSoundDevice_AddBuffer( - hr = DSERR_OUTOFMEMORY; - } - -- RtlReleaseResource(&(device->buffer_list_lock)); -+ ReleaseSRWLockExclusive(&device->buffer_list_lock); - - return hr; - } -@@ -648,7 +647,7 @@ void DirectSoundDevice_RemoveBuffer(DirectSoundDevice * device, IDirectSoundBuff - - TRACE("(%p, %p)\n", device, pDSB); - -- RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE); -+ AcquireSRWLockExclusive(&device->buffer_list_lock); - - if (device->nrofbuffers == 1) { - assert(device->buffers[0] == pDSB); -@@ -666,7 +665,7 @@ void DirectSoundDevice_RemoveBuffer(DirectSoundDevice * device, IDirectSoundBuff - device->nrofbuffers--; - TRACE("buffer count is now %d\n", device->nrofbuffers); - -- RtlReleaseResource(&(device->buffer_list_lock)); -+ ReleaseSRWLockExclusive(&device->buffer_list_lock); - } - - /******************************************************************************* -@@ -873,14 +872,14 @@ static HRESULT WINAPI IDirectSound8Impl_SetCooperativeLevel(IDirectSound8 *iface - level==DSSCL_PRIORITY ? "DSSCL_PRIORITY" : "DSSCL_EXCLUSIVE"); - } - -- RtlAcquireResourceExclusive(&device->buffer_list_lock, TRUE); -+ AcquireSRWLockExclusive(&device->buffer_list_lock); - EnterCriticalSection(&device->mixlock); - if ((level == DSSCL_WRITEPRIMARY) != (device->priolevel == DSSCL_WRITEPRIMARY)) - hr = DSOUND_ReopenDevice(device, level == DSSCL_WRITEPRIMARY); - if (SUCCEEDED(hr)) - device->priolevel = level; - LeaveCriticalSection(&device->mixlock); -- RtlReleaseResource(&device->buffer_list_lock); -+ ReleaseSRWLockExclusive(&device->buffer_list_lock); - return hr; - } - -diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h -index dcb67d56948..87786c6b11b 100644 ---- a/dlls/dsound/dsound_private.h -+++ b/dlls/dsound/dsound_private.h -@@ -83,7 +83,7 @@ struct DirectSoundDevice - DWORD writelead, buflen, ac_frames, frag_frames, playpos, pad, stopped; - int nrofbuffers; - IDirectSoundBufferImpl** buffers; -- RTL_RWLOCK buffer_list_lock; -+ RTL_SRWLOCK buffer_list_lock; - CRITICAL_SECTION mixlock; - IDirectSoundBufferImpl *primary; - DWORD speaker_config; -diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c -index 023622a9f98..3006d249d43 100644 ---- a/dlls/dsound/mixer.c -+++ b/dlls/dsound/mixer.c -@@ -856,9 +856,9 @@ DWORD CALLBACK DSOUND_mixthread(void *p) - if (!dev->ref) - break; - -- RtlAcquireResourceShared(&(dev->buffer_list_lock), TRUE); -+ AcquireSRWLockShared(&dev->buffer_list_lock); - DSOUND_PerformMix(dev); -- RtlReleaseResource(&(dev->buffer_list_lock)); -+ ReleaseSRWLockShared(&dev->buffer_list_lock); - } - return 0; - } -diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c -index 852ec51b7ff..8d42fe0ed90 100644 ---- a/dlls/dsound/primary.c -+++ b/dlls/dsound/primary.c -@@ -472,7 +472,7 @@ HRESULT primarybuffer_SetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX passe - } - - /* **** */ -- RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE); -+ AcquireSRWLockExclusive(&device->buffer_list_lock); - EnterCriticalSection(&(device->mixlock)); - - if (device->priolevel == DSSCL_WRITEPRIMARY) { -@@ -508,7 +508,7 @@ HRESULT primarybuffer_SetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX passe - - out: - LeaveCriticalSection(&(device->mixlock)); -- RtlReleaseResource(&(device->buffer_list_lock)); -+ ReleaseSRWLockExclusive(&device->buffer_list_lock); - /* **** */ - - return err; --- -2.24.1 - diff --git a/patches/dsound-SRW/definition b/patches/dsound-SRW/definition deleted file mode 100644 index 9edc4f6a..00000000 --- a/patches/dsound-SRW/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [48408] dsound: Use an SRW lock for buffer_list_lock. diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 9d211b44..a8e15d4b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "bdf8d94e2a40f82c618ba5587cc82382c5230ac0" + echo "87875e12bcdca659e578849fa62585b1b5316a50" } # Show version information @@ -135,7 +135,6 @@ patch_enable_all () enable_dsdmo_new_dll="$1" enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" - enable_dsound_SRW="$1" enable_dwmapi_DwmGetTransportAttributes="$1" enable_dwrite_FontFallback="$1" enable_dxdiagn_Enumerate_DirectSound="$1" @@ -527,9 +526,6 @@ patch_enable () dsound-Fast_Mixer) enable_dsound_Fast_Mixer="$2" ;; - dsound-SRW) - enable_dsound_SRW="$2" - ;; dwmapi-DwmGetTransportAttributes) enable_dwmapi_DwmGetTransportAttributes="$2" ;; @@ -3283,21 +3279,6 @@ if test "$enable_dsound_EAX" -eq 1; then ) >> "$patchlist" fi -# Patchset dsound-SRW -# | -# | This patchset fixes the following Wine bugs: -# | * [#48408] dsound: Use an SRW lock for buffer_list_lock. -# | -# | Modified files: -# | * dlls/dsound/buffer.c, dlls/dsound/dsound.c, dlls/dsound/dsound_private.h, dlls/dsound/mixer.c, dlls/dsound/primary.c -# | -if test "$enable_dsound_SRW" -eq 1; then - patch_apply dsound-SRW/0001-dsound-Use-an-SRW-lock-for-buffer_list_lock.patch - ( - printf '%s\n' '+ { "Zebediah Figura", "dsound: Use an SRW lock for buffer_list_lock.", 1 },'; - ) >> "$patchlist" -fi - # Patchset dwmapi-DwmGetTransportAttributes # | # | Modified files: