mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Updated winepulse-PulseAudio_Support patchset
This commit is contained in:
parent
c30bad1531
commit
d792ec8a45
@ -7465,6 +7465,9 @@ if test "$enable_winepulse_PulseAudio_Support" -eq 1; then
|
||||
patch_apply winepulse-PulseAudio_Support/0008-winepulse-Fix-up-recording.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0009-winepulse.drv-Fix-getting-the-same-timing-info.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0010-winepulse-Update-last-time-on-underrun.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0011-winepulse-account-for-PA-devices-that-fall-way-behin.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0012-winepulse-Fix-local-buffer-offset-wrapping.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0013-winepulse-Don-t-fake-being-one-period-behind-in-GetP.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "winepulse.drv: Use a separate mainloop and ctx for pulse_test_connect.", 1 },';
|
||||
printf '%s\n' '+ { "Andrew Eikum", "winepulse: Don'\''t rely on pulseaudio callbacks for timing.", 1 },';
|
||||
@ -7476,6 +7479,9 @@ if test "$enable_winepulse_PulseAudio_Support" -eq 1; then
|
||||
printf '%s\n' '+ { "Andrew Eikum", "winepulse: Fix up recording.", 1 },';
|
||||
printf '%s\n' '+ { "Zhiyi Zhang", "winepulse.drv: Fix getting the same timing info.", 1 },';
|
||||
printf '%s\n' '+ { "Andrew Eikum", "winepulse: Update last time on underrun.", 1 },';
|
||||
printf '%s\n' '+ { "Andrew Eikum", "winepulse: Account for PA devices that fall way behind.", 1 },';
|
||||
printf '%s\n' '+ { "Andrew Eikum", "winepulse: Fix local buffer offset wrapping.", 1 },';
|
||||
printf '%s\n' '+ { "Andrew Eikum", "winepulse: Don'\''t fake being one period behind in GetPosition.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 262abc1d8daf243cf295c060ff4c47f93dcdbe2f Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Tue, 4 Sep 2018 13:40:58 -0500
|
||||
Subject: [PATCH 1/3] winepulse: account for PA devices that fall way behind
|
||||
To: wine-devel <wine-devel@winehq.org>
|
||||
Reply-To: wine-devel <wine-devel@winehq.org>,Andrew Eikum <aeikum@codeweavers.com>
|
||||
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 1ce6cea9d6..6b994ada4e 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -980,6 +980,9 @@ static void pulse_underflow_callback(pa_stream *s, void *userdata)
|
||||
ACImpl *This = userdata;
|
||||
WARN("%p: Underflow\n", userdata);
|
||||
This->just_underran = TRUE;
|
||||
+ /* re-sync */
|
||||
+ This->pa_offs_bytes = This->lcl_offs_bytes;
|
||||
+ This->pa_held_bytes = This->held_bytes;
|
||||
}
|
||||
|
||||
static void pulse_started_callback(pa_stream *s, void *userdata)
|
||||
@@ -2524,6 +2527,11 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
|
||||
|
||||
This->held_bytes += written_bytes;
|
||||
This->pa_held_bytes += written_bytes;
|
||||
+ if(This->pa_held_bytes > This->real_bufsize_bytes){
|
||||
+ This->pa_offs_bytes += This->pa_held_bytes - This->real_bufsize_bytes;
|
||||
+ This->pa_offs_bytes %= This->real_bufsize_bytes;
|
||||
+ This->pa_held_bytes = This->real_bufsize_bytes;
|
||||
+ }
|
||||
This->clock_written += written_bytes;
|
||||
This->locked = 0;
|
||||
|
||||
--
|
||||
2.19.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 6f0f6b7e3d3a28df29577f7da93f8e3837386ab1 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Fri, 19 Oct 2018 14:22:35 -0500
|
||||
Subject: [PATCH 2/3] winepulse: Fix local buffer offset wrapping
|
||||
To: wine-devel <wine-devel@winehq.org>
|
||||
Reply-To: wine-devel <wine-devel@winehq.org>,Andrew Eikum <aeikum@codeweavers.com>
|
||||
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 6b994ada4e..fb2e3678f8 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -1148,6 +1148,7 @@ static DWORD WINAPI pulse_timer_cb(void *user)
|
||||
/* regardless of what PA does, advance one period */
|
||||
adv_bytes = min(This->period_bytes, This->held_bytes);
|
||||
This->lcl_offs_bytes += adv_bytes;
|
||||
+ This->lcl_offs_bytes %= This->real_bufsize_bytes;
|
||||
This->held_bytes -= adv_bytes;
|
||||
}else if(This->dataflow == eCapture){
|
||||
pulse_read(This);
|
||||
--
|
||||
2.19.2
|
||||
|
@ -0,0 +1,33 @@
|
||||
From cf1e1aa8a37ea52f70874931b80611eee7a27f83 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Mon, 26 Nov 2018 15:04:38 -0600
|
||||
Subject: [PATCH 3/3] winepulse: Don't fake being one period behind in
|
||||
GetPosition
|
||||
To: wine-devel <wine-devel@winehq.org>
|
||||
Reply-To: wine-devel <wine-devel@winehq.org>,Andrew Eikum <aeikum@codeweavers.com>
|
||||
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index fb2e3678f8..39284e55ad 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -2769,13 +2769,6 @@ static HRESULT WINAPI AudioClock_GetPosition(IAudioClock *iface, UINT64 *pos,
|
||||
|
||||
*pos = This->clock_written - This->held_bytes;
|
||||
|
||||
- if(This->started){
|
||||
- if(*pos < This->period_bytes)
|
||||
- *pos = 0;
|
||||
- else if(This->held_bytes > This->period_bytes)
|
||||
- *pos -= This->period_bytes;
|
||||
- }
|
||||
-
|
||||
if (This->share == AUDCLNT_SHAREMODE_EXCLUSIVE)
|
||||
*pos /= pa_frame_size(&This->ss);
|
||||
|
||||
--
|
||||
2.19.2
|
||||
|
Loading…
Reference in New Issue
Block a user