Removed dsound-Revert_Cleanup patchset

This patchset appears not to correct anything and is just here
to make applying other patchsets easier.
This commit is contained in:
Alistair Leslie-Hughes 2018-09-17 14:08:36 +10:00
parent bd3794c11e
commit 9517e98320
6 changed files with 31 additions and 296 deletions

View File

@ -1,29 +1,28 @@
From 76cd66f5f32045665fe392401b63738a5a089072 Mon Sep 17 00:00:00 2001
From f66f232de49f8fd3e14e8f328e16e89b83e7dcc8 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Fri, 27 Mar 2015 20:58:37 +0000
Subject: dsound: Add EAX init and free stubs.
Subject: [PATCH] dsound: Add EAX init and free stubs.
---
dlls/dsound/buffer.c | 5 +++++
dlls/dsound/buffer.c | 4 ++++
dlls/dsound/dsound_private.h | 2 ++
dlls/dsound/eax.c | 28 +++++++++++++++++++++++++++-
3 files changed, 34 insertions(+), 1 deletion(-)
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 1c318f5..c098043 100644
index 720bec9..7e9e478 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -1130,6 +1130,9 @@ HRESULT IDirectSoundBufferImpl_Create(
HeapFree(GetProcessHeap(),0,dsb);
dsb = NULL;
}
+
+ if (dsb->device->eax.using_eax)
+ init_eax_buffer(dsb);
}
@@ -1104,6 +1104,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
DSOUND_RecalcVolPan(&(dsb->volpan));
IDirectSoundBuffer8_AddRef(&dsb->IDirectSoundBuffer8_iface);
@@ -1169,6 +1172,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
RtlInitializeResource(&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)
HeapFree(GetProcessHeap(), 0, This->filters);
}
@ -33,10 +32,10 @@ index 1c318f5..c098043 100644
TRACE("(%p) released\n", This);
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index c732b52..a918cd2 100644
index e412533..6c90726 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -240,6 +240,8 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
@@ -235,6 +235,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;
@ -98,5 +97,5 @@ index 3931681..c0afb0f 100644
HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
--
2.3.3
1.9.1

View File

@ -1,7 +1,7 @@
From de001ceaf5bab22bacfd14c927bfa8c0f29c74a1 Mon Sep 17 00:00:00 2001
From 630c89c7e41eb1cde6dd99bf5c3462d173236b3a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 4 Apr 2015 21:09:18 +0200
Subject: dsound: Various improvements to EAX support.
Subject: [PATCH] dsound: Various improvements to EAX support.
The previous version had several problems (see wine-staging bug 195):
* IDirectSoundBufferImpl_Duplicate doesn't initialize EAX properties
@ -16,18 +16,18 @@ update it later when necessary (-> much faster). Moreover, to avoid unnecessary
locking, we initialize the EAX-specific properties always (for both the device and
the buffers).
---
dlls/dsound/buffer.c | 11 ++++---
dlls/dsound/buffer.c | 6 ++--
dlls/dsound/dsound.c | 2 ++
dlls/dsound/dsound_eax.h | 1 +
dlls/dsound/dsound_private.h | 1 +
dlls/dsound/eax.c | 68 +++++++++++++++++++-------------------------
5 files changed, 39 insertions(+), 44 deletions(-)
5 files changed, 37 insertions(+), 41 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index c098043..3641e32 100644
index 7e9e478..088a5e7 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -1092,8 +1092,6 @@ HRESULT IDirectSoundBufferImpl_Create(
@@ -1078,8 +1078,6 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
/* calculate fragment size and write lead */
DSOUND_RecalcFormat(dsb);
@ -36,26 +36,7 @@ index c098043..3641e32 100644
if (dsb->dsbd.dwFlags & DSBCAPS_CTRL3D) {
dsb->ds3db_ds3db.dwSize = sizeof(DS3DBUFFER);
dsb->ds3db_ds3db.vPosition.x = 0.0;
@@ -1121,6 +1119,8 @@ HRESULT IDirectSoundBufferImpl_Create(
/* register buffer if not primary */
if (!(dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER)) {
+ init_eax_buffer(dsb);
+
err = DirectSoundDevice_AddBuffer(device, dsb);
if (err != DS_OK) {
HeapFree(GetProcessHeap(),0,dsb->buffer->memory);
@@ -1130,9 +1130,6 @@ HRESULT IDirectSoundBufferImpl_Create(
HeapFree(GetProcessHeap(),0,dsb);
dsb = NULL;
}
-
- if (dsb->device->eax.using_eax)
- init_eax_buffer(dsb);
}
IDirectSoundBuffer8_AddRef(&dsb->IDirectSoundBuffer8_iface);
@@ -1188,7 +1185,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
@@ -1165,7 +1163,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
HRESULT hres = DS_OK;
TRACE("(%p,%p,%p)\n", device, ppdsb, pdsb);
@ -64,7 +45,7 @@ index c098043..3641e32 100644
if (dsb == NULL) {
WARN("out of memory\n");
*ppdsb = NULL;
@@ -1225,6 +1222,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
@@ -1202,6 +1200,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
RtlInitializeResource(&dsb->lock);
@ -74,10 +55,10 @@ index c098043..3641e32 100644
hres = DirectSoundDevice_AddBuffer(device, dsb);
if (hres != DS_OK) {
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 551c40a..4abb142 100644
index 59e2fcd..13cda26 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -186,6 +186,8 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
@@ -181,6 +181,8 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
RtlInitializeResource(&(device->buffer_list_lock));
@ -99,10 +80,10 @@ index a650108..a555a75 100644
float *SampleBuffer;
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index cc55d70..a9987d0 100644
index 6f8dddd..039154a 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -240,6 +240,7 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
@@ -235,6 +235,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;
@ -272,5 +253,5 @@ index a05b00e..e10156e 100644
switch (dwPropID) {
case DSPROPERTY_EAXBUFFER_ALL:
--
2.4.0
1.9.1

View File

@ -1,3 +1,2 @@
Fixes: Software support for Environmental Audio Extensions (EAX)
Depends: dsound-Fast_Mixer
Depends: dsound-Revert_Cleanup

View File

@ -1,106 +0,0 @@
From 49a87ca03766da11e80ec5f0677d1cd7d46b17ca Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 23 Dec 2015 00:58:57 +0100
Subject: Revert "dsound: Use a better name for
IDirectSoundBufferImpl_Create()."
This reverts commit bb72548f3870b1df03ad9fe7ad2e543a69d5d574.
---
dlls/dsound/buffer.c | 24 +++++++++++++++---------
dlls/dsound/dsound.c | 7 +++++--
dlls/dsound/dsound_private.h | 6 ++++--
3 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index e85a5d1..c59090a 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -983,15 +983,19 @@ static const IDirectSoundBuffer8Vtbl dsbvt =
IDirectSoundBufferImpl_GetObjectInPath
};
-HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *dsbd,
- IDirectSoundBuffer **buffer)
+HRESULT IDirectSoundBufferImpl_Create(
+ DirectSoundDevice * device,
+ IDirectSoundBufferImpl **pdsb,
+ LPCDSBUFFERDESC dsbd)
{
IDirectSoundBufferImpl *dsb;
LPWAVEFORMATEX wfex = dsbd->lpwfxFormat;
HRESULT err = DS_OK;
DWORD capf = 0;
- TRACE("(%p,%p,%p)\n", device, dsbd, buffer);
+ TRACE("(%p,%p,%p)\n",device,pdsb,dsbd);
+
+ *pdsb = NULL;
if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) {
WARN("invalid parameter: dsbd->dwBufferBytes = %d\n", dsbd->dwBufferBytes);
@@ -1103,12 +1107,14 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
RtlInitializeResource(&dsb->lock);
- /* register buffer */
- err = DirectSoundDevice_AddBuffer(device, dsb);
- if (err == DS_OK)
- *buffer = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface;
- else
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ /* register buffer if not primary */
+ if (!(dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER)) {
+ err = DirectSoundDevice_AddBuffer(device, dsb);
+ if (err == DS_OK)
+ *pdsb = dsb;
+ else
+ IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ }
return err;
}
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index fb9fd66..64bfbd3 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -461,6 +461,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
WARN("primarybuffer_create() failed\n");
}
} else {
+ IDirectSoundBufferImpl * dsb;
+
if (dsbd->lpwfxFormat == NULL) {
WARN("invalid parameter: dsbd->lpwfxFormat can't be NULL for "
"secondary buffer\n");
@@ -537,8 +539,9 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
return DSERR_INVALIDPARAM;
}
- hres = secondarybuffer_create(device, dsbd, ppdsb);
- if (SUCCEEDED(hres)) {
+ hres = IDirectSoundBufferImpl_Create(device, &dsb, dsbd);
+ if (dsb) {
+ *ppdsb = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface;
if (dsbd->dwFlags & DSBCAPS_LOCHARDWARE)
device->drvcaps.dwFreeHwMixingAllBuffers--;
} else
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 63d1226..303ce0e 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -181,8 +181,10 @@ void put_stereo2surround51(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD c
void put_surround512stereo(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel, float value) DECLSPEC_HIDDEN;
void put_quad2stereo(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel, float value) DECLSPEC_HIDDEN;
-HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *dsbd,
- IDirectSoundBuffer **buffer) DECLSPEC_HIDDEN;
+HRESULT IDirectSoundBufferImpl_Create(
+ DirectSoundDevice *device,
+ IDirectSoundBufferImpl **ppdsb,
+ LPCDSBUFFERDESC dsbd) DECLSPEC_HIDDEN;
HRESULT IDirectSoundBufferImpl_Duplicate(
DirectSoundDevice *device,
IDirectSoundBufferImpl **ppdsb,
--
2.8.0

View File

@ -1,116 +0,0 @@
From 974a901f92d5197d3db6356df454bdd47dea39da Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 23 Dec 2015 00:59:07 +0100
Subject: Revert "dsound: Simplify error handling when creating a sound
buffer."
This reverts commit d51d55bab8995f94dcc78ce8418a4149836c27b0.
---
dlls/dsound/buffer.c | 46 ++++++++++++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index d7717fd..5aa2834 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -992,28 +992,29 @@ HRESULT IDirectSoundBufferImpl_Create(
LPWAVEFORMATEX wfex = dsbd->lpwfxFormat;
HRESULT err = DS_OK;
DWORD capf = 0;
-
TRACE("(%p,%p,%p)\n",device,pdsb,dsbd);
- *pdsb = NULL;
-
if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) {
WARN("invalid parameter: dsbd->dwBufferBytes = %d\n", dsbd->dwBufferBytes);
+ *pdsb = NULL;
return DSERR_INVALIDPARAM; /* FIXME: which error? */
}
dsb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb));
- if (!dsb)
+ if (dsb == 0) {
+ WARN("out of memory\n");
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
+ }
TRACE("Created buffer at %p\n", dsb);
- dsb->ref = 1;
+ dsb->ref = 0;
dsb->refn = 0;
dsb->ref3D = 0;
dsb->refiks = 0;
- dsb->numIfaces = 1;
+ dsb->numIfaces = 0;
dsb->device = device;
dsb->IDirectSoundBuffer8_iface.lpVtbl = &dsbvt;
dsb->IDirectSoundNotify_iface.lpVtbl = &dsnvt;
@@ -1024,8 +1025,9 @@ HRESULT IDirectSoundBufferImpl_Create(
CopyMemory(&dsb->dsbd, dsbd, dsbd->dwSize);
dsb->pwfx = DSOUND_CopyFormat(wfex);
- if (!dsb->pwfx) {
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ if (dsb->pwfx == NULL) {
+ HeapFree(GetProcessHeap(),0,dsb);
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
}
@@ -1050,16 +1052,22 @@ HRESULT IDirectSoundBufferImpl_Create(
/* Allocate an empty buffer */
dsb->buffer = HeapAlloc(GetProcessHeap(),0,sizeof(*(dsb->buffer)));
- if (!dsb->buffer) {
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ if (dsb->buffer == NULL) {
+ WARN("out of memory\n");
+ HeapFree(GetProcessHeap(),0,dsb->pwfx);
+ HeapFree(GetProcessHeap(),0,dsb);
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
}
/* Allocate system memory for buffer */
dsb->buffer->memory = HeapAlloc(GetProcessHeap(),0,dsb->buflen);
- if (!dsb->buffer->memory) {
+ if (dsb->buffer->memory == NULL) {
WARN("out of memory\n");
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ HeapFree(GetProcessHeap(),0,dsb->pwfx);
+ HeapFree(GetProcessHeap(),0,dsb->buffer);
+ HeapFree(GetProcessHeap(),0,dsb);
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
}
@@ -1110,12 +1118,18 @@ HRESULT IDirectSoundBufferImpl_Create(
/* register buffer if not primary */
if (!(dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER)) {
err = DirectSoundDevice_AddBuffer(device, dsb);
- if (err == DS_OK)
- *pdsb = dsb;
- else
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ if (err != DS_OK) {
+ HeapFree(GetProcessHeap(),0,dsb->buffer->memory);
+ HeapFree(GetProcessHeap(),0,dsb->buffer);
+ RtlDeleteResource(&dsb->lock);
+ HeapFree(GetProcessHeap(),0,dsb->pwfx);
+ HeapFree(GetProcessHeap(),0,dsb);
+ dsb = NULL;
+ }
}
+ IDirectSoundBuffer8_AddRef(&dsb->IDirectSoundBuffer8_iface);
+ *pdsb = dsb;
return err;
}
--
2.6.4

View File

@ -137,7 +137,6 @@ patch_enable_all ()
enable_dinput_Initialize="$1"
enable_dsound_EAX="$1"
enable_dsound_Fast_Mixer="$1"
enable_dsound_Revert_Cleanup="$1"
enable_dwrite_FontFallback="$1"
enable_dxdiagn_Enumerate_DirectSound="$1"
enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1"
@ -579,9 +578,6 @@ patch_enable ()
dsound-Fast_Mixer)
enable_dsound_Fast_Mixer="$2"
;;
dsound-Revert_Cleanup)
enable_dsound_Revert_Cleanup="$2"
;;
dwrite-FontFallback)
enable_dwrite_FontFallback="$2"
;;
@ -2204,11 +2200,7 @@ if test "$enable_dsound_EAX" -eq 1; then
if test "$enable_dsound_Fast_Mixer" -gt 1; then
abort "Patchset dsound-Fast_Mixer disabled, but dsound-EAX depends on that."
fi
if test "$enable_dsound_Revert_Cleanup" -gt 1; then
abort "Patchset dsound-Revert_Cleanup disabled, but dsound-EAX depends on that."
fi
enable_dsound_Fast_Mixer=1
enable_dsound_Revert_Cleanup=1
fi
if test "$enable_d3dx9_36_DXTn" -eq 1; then
@ -3458,24 +3450,10 @@ if test "$enable_dsound_Fast_Mixer" -eq 1; then
) >> "$patchlist"
fi
# Patchset dsound-Revert_Cleanup
# |
# | Modified files:
# | * dlls/dsound/buffer.c, dlls/dsound/dsound.c, dlls/dsound/dsound_private.h
# |
if test "$enable_dsound_Revert_Cleanup" -eq 1; then
patch_apply dsound-Revert_Cleanup/0001-Revert-dsound-Use-a-better-name-for-IDirectSoundBuff.patch
patch_apply dsound-Revert_Cleanup/0002-Revert-dsound-Simplify-error-handling-when-creating-.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "Revert \"dsound: Use a better name for IDirectSoundBufferImpl_Create().\".", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "Revert \"dsound: Simplify error handling when creating a sound buffer.\".", 1 },';
) >> "$patchlist"
fi
# Patchset dsound-EAX
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * dsound-Fast_Mixer, dsound-Revert_Cleanup
# | * dsound-Fast_Mixer
# |
# | Modified files:
# | * dlls/dsound/Makefile.in, dlls/dsound/buffer.c, dlls/dsound/dsound.c, dlls/dsound/dsound_eax.h,