Rebase against aaf304f2441ebe52834fdda2b8a02a5349d2ca43.

This commit is contained in:
Alistair Leslie-Hughes
2023-07-08 10:46:04 +10:00
parent e57244a59e
commit 01fbf6d356
9 changed files with 291 additions and 181 deletions

View File

@@ -1,4 +1,4 @@
From cdbe11004fe8b7fb87fff18f2a458259be02fe2d Mon Sep 17 00:00:00 2001
From 3124bfe7d388479e6c82a766735cc5032654083a Mon Sep 17 00:00:00 2001
From: "Alexander E. Patrakov" <patrakov at gmail.com>
Date: Thu, 7 Aug 2014 17:15:00 -0600
Subject: [PATCH] dsound: Add a linear resampler for use with a large number of
@@ -6,15 +6,15 @@ Subject: [PATCH] dsound: Add a linear resampler for use with a large number of
---
dlls/dsound/dsound_main.c | 5 ++++
dlls/dsound/dsound_private.h | 1 +
dlls/dsound/dsound_private.h | 2 ++
dlls/dsound/mixer.c | 48 +++++++++++++++++++++++++++++++++---
3 files changed, 51 insertions(+), 3 deletions(-)
3 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index f3bce6062fe..fecb9489678 100644
index 69cbec72ea3..11983a4cb47 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -92,6 +92,7 @@ const WCHAR wine_vxd_drv[] = L"winemm.vxd";
@@ -93,6 +93,7 @@ const WCHAR wine_vxd_drv[] = L"winemm.vxd";
/* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */
int ds_hel_buflen = 32768 * 2;
@@ -22,7 +22,7 @@ index f3bce6062fe..fecb9489678 100644
/*
* Get a config key from either the app-specific or the default config
@@ -143,10 +144,14 @@ void setup_dsound_options(void)
@@ -144,10 +145,14 @@ void setup_dsound_options(void)
if (!get_config_key( hkey, appkey, "HelBuflen", buffer, MAX_PATH ))
ds_hel_buflen = atoi(buffer);
@@ -38,22 +38,24 @@ index f3bce6062fe..fecb9489678 100644
static const char * get_device_id(LPCGUID pGuid)
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index bdb9ebee544..d154e67b0a0 100644
index 80e6725fd27..172efd6c1cc 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -35,6 +35,7 @@
@@ -34,7 +34,9 @@
#define DS_MAX_CHANNELS 6
extern int ds_hel_buflen DECLSPEC_HIDDEN;
+extern int ds_hq_buffers_max DECLSPEC_HIDDEN;
+
extern int ds_hel_buflen;
+extern int ds_hq_buffers_max;
/*****************************************************************************
* Predeclare the interface implementation structures
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index a6402b09eff..28f32e9d092 100644
index bf05805221b..042b9499727 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -295,7 +295,47 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
@@ -314,7 +314,47 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
return count;
}
@@ -102,7 +104,7 @@ index a6402b09eff..28f32e9d092 100644
{
UINT i, channel;
UINT istride = dsb->pwfx->nBlockAlign;
@@ -374,9 +414,11 @@ static void cp_fields(IDirectSoundBufferImpl *dsb, UINT count, LONG64 *freqAccNu
@@ -405,9 +445,11 @@ static void cp_fields(IDirectSoundBufferImpl *dsb, UINT count, LONG64 *freqAccNu
DWORD ipos, adv;
if (dsb->freqAdjustNum == dsb->freqAdjustDen)
@@ -117,5 +119,5 @@ index a6402b09eff..28f32e9d092 100644
ipos = dsb->sec_mixpos + adv * dsb->pwfx->nBlockAlign;
if (ipos >= dsb->buflen) {
--
2.30.2
2.40.1