wine-staging/patches/dsound-EAX/0009-dsound-Feed-data-through-EAX-function.patch

66 lines
2.5 KiB
Diff

From 035915e64ffbd674e38bb46c4ac10834bfc25961 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Fri, 27 Mar 2015 20:59:57 +0000
Subject: [PATCH] dsound: Feed data through EAX function.
---
dlls/dsound/dsound_private.h | 1 +
dlls/dsound/eax.c | 5 +++++
dlls/dsound/mixer.c | 5 ++++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index e58a45cfb7d..b9b608be7c0 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -243,6 +243,7 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
ULONG cbPropData);
void free_eax_buffer(IDirectSoundBufferImpl *dsb);
void init_eax_buffer(IDirectSoundBufferImpl *dsb);
+void process_eax_buffer(IDirectSoundBufferImpl *dsb, float *buf, DWORD count);
/* mixer.c */
void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len);
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index 91438efc335..bf7efdc4f38 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -92,6 +92,11 @@ static const EFXEAXREVERBPROPERTIES efx_presets[] = {
{ 0.0625f, 0.5000f, 0.3162f, 0.8404f, 1.0000f, 7.5600f, 0.9100f, 1.0000f, 0.4864f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 2.4378f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 4.0000f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } /* psychotic */
};
+void process_eax_buffer(IDirectSoundBufferImpl *dsb, float *buf, DWORD count)
+{
+ /* stub */
+}
+
static void ReverbUpdate(IDirectSoundBufferImpl *dsb)
{
/* stub */
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index f261588454a..33dcd8a953c 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -514,7 +514,7 @@ static void putieee32_dsp(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD ch
*/
static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
{
- BOOL using_filters = dsb->num_filters > 0;
+ BOOL using_filters = dsb->num_filters > 0 || dsb->device->eax.using_eax;
UINT istride, ostride, size_bytes;
DWORD channel, i;
bitsputfunc put;
@@ -561,6 +561,9 @@ static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
}
}
+ if (dsb->device->eax.using_eax)
+ process_eax_buffer(dsb, dsb->device->dsp_buffer, frames * dsb->mix_channels);
+
istride = ostride;
ostride = dsb->device->pwfx->nChannels * sizeof(float);
for (i = 0; i < frames; i++) {
--
2.42.0