Updated winepulse-PulseAudio_Support patchset

This commit is contained in:
Alistair Leslie-Hughes 2021-07-18 11:55:05 +10:00
parent 092f3b1ed1
commit 183fd3e089

View File

@ -1,4 +1,4 @@
From 9f168a3042f1c5cd042626d4aaac46331e6696bc Mon Sep 17 00:00:00 2001
From edb8be68e6c30043c6723f0928036b3a4bdb67bc Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Nov 2015 02:57:56 +0100
Subject: [PATCH] winepulse.drv: Use a separate mainloop and ctx for
@ -9,10 +9,10 @@ Subject: [PATCH] winepulse.drv: Use a separate mainloop and ctx for
1 file changed, 27 insertions(+), 30 deletions(-)
diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c
index 260723815f6..b55c5889e1b 100644
index 55579ecda80..b91afe4b22b 100644
--- a/dlls/winepulse.drv/pulse.c
+++ b/dlls/winepulse.drv/pulse.c
@@ -370,7 +370,7 @@ static void convert_channel_map(const pa_channel_map *pa_map, WAVEFORMATEXTENSIB
@@ -428,7 +428,7 @@ static void convert_channel_map(const pa_channel_map *pa_map, WAVEFORMATEXTENSIB
fmt->dwChannelMask = pa_mask;
}
@ -21,7 +21,7 @@ index 260723815f6..b55c5889e1b 100644
WAVEFORMATEX *wfx = &fmt->Format;
pa_stream *stream;
pa_channel_map map;
@@ -389,7 +389,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
@@ -447,7 +447,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
attr.minreq = attr.fragsize = pa_frame_size(&ss);
attr.prebuf = 0;
@ -30,7 +30,7 @@ index 260723815f6..b55c5889e1b 100644
if (stream)
pa_stream_set_state_callback(stream, pulse_stream_state, NULL);
if (!stream)
@@ -400,7 +400,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
@@ -458,7 +458,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
else
ret = pa_stream_connect_record(stream, NULL, &attr, PA_STREAM_START_CORKED|PA_STREAM_FIX_RATE|PA_STREAM_FIX_CHANNELS|PA_STREAM_EARLY_REQUESTS);
if (ret >= 0) {
@ -39,7 +39,7 @@ index 260723815f6..b55c5889e1b 100644
pa_stream_get_state(stream) == PA_STREAM_CREATING)
{}
if (pa_stream_get_state(stream) == PA_STREAM_READY) {
@@ -411,7 +411,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
@@ -469,7 +469,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
else
length = pa_stream_get_buffer_attr(stream)->fragsize;
pa_stream_disconnect(stream);
@ -48,8 +48,8 @@ index 260723815f6..b55c5889e1b 100644
pa_stream_get_state(stream) == PA_STREAM_READY)
{}
}
@@ -456,30 +456,31 @@ static HRESULT WINAPI pulse_test_connect(const char *name, struct pulse_config *
{
@@ -516,31 +516,32 @@ static NTSTATUS pulse_test_connect(void *args)
struct pulse_config *config = params->config;
pa_operation *o;
int ret;
+ pa_mainloop *ml;
@ -62,16 +62,17 @@ index 260723815f6..b55c5889e1b 100644
- pa_mainloop_set_poll_func(pulse_ml, pulse_poll_func, NULL);
+ pa_mainloop_set_poll_func(ml, pulse_poll_func, NULL);
- pulse_ctx = pa_context_new(pa_mainloop_get_api(pulse_ml), name);
- pulse_ctx = pa_context_new(pa_mainloop_get_api(pulse_ml), params->name);
- if (!pulse_ctx) {
+ ctx = pa_context_new(pa_mainloop_get_api(ml), name);
+ ctx = pa_context_new(pa_mainloop_get_api(ml), params->name);
+ if (!ctx) {
ERR("Failed to create context\n");
- pa_mainloop_free(pulse_ml);
- pulse_ml = NULL;
+ pa_mainloop_free(ml);
pulse_unlock();
return E_FAIL;
params->result = E_FAIL;
return STATUS_SUCCESS;
}
- pa_context_set_state_callback(pulse_ctx, pulse_contextcallback, NULL);
@ -91,7 +92,7 @@ index 260723815f6..b55c5889e1b 100644
if (state == PA_CONTEXT_FAILED || state == PA_CONTEXT_TERMINATED)
goto fail;
@@ -488,29 +489,27 @@ static HRESULT WINAPI pulse_test_connect(const char *name, struct pulse_config *
@@ -549,29 +550,27 @@ static NTSTATUS pulse_test_connect(void *args)
break;
}
@ -130,8 +131,8 @@ index 260723815f6..b55c5889e1b 100644
config->speakers_mask = g_phys_speakers_mask;
config->modes[0].format = pulse_fmt[0];
@@ -525,10 +524,8 @@ static HRESULT WINAPI pulse_test_connect(const char *name, struct pulse_config *
return S_OK;
@@ -587,10 +586,8 @@ static NTSTATUS pulse_test_connect(void *args)
return STATUS_SUCCESS;
fail:
- pa_context_unref(pulse_ctx);
@ -141,8 +142,8 @@ index 260723815f6..b55c5889e1b 100644
+ pa_context_unref(ctx);
+ pa_mainloop_free(ml);
pulse_unlock();
return E_FAIL;
params->result = E_FAIL;
return STATUS_SUCCESS;
--
2.30.2