mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against a410990f7cb0fd7477d4594f8644428ca8873f0e.
This commit is contained in:
parent
a51602d5df
commit
3f08cafe30
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -10,6 +10,7 @@ wine-staging (1.7.55) UNRELEASED; urgency=low
|
||||
of enumeration (accepted upstream).
|
||||
* Removed patch for SfcGetNextProtectedFile stub function (accepted upstream).
|
||||
* Removed patch for SetConsoleKeyShortcuts stub function (accepted upstream).
|
||||
* Removed various PulseAudio driver patches (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 01 Nov 2015 01:06:20 +0100
|
||||
|
||||
wine-staging (1.7.54) unstable; urgency=low
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "b53256b8b752855576252cc2290dfbc9cb0f1280"
|
||||
echo "a410990f7cb0fd7477d4594f8644428ca8873f0e"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -6211,30 +6211,18 @@ fi
|
||||
# | * [#37042] Implement exclusive mode in PulseAudio backend
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winepulse.drv/Makefile.in, dlls/winepulse.drv/mmdevdrv.c, dlls/winepulse.drv/winepulse.drv.spec
|
||||
# | * dlls/winepulse.drv/Makefile.in, dlls/winepulse.drv/mmdevdrv.c
|
||||
# |
|
||||
if test "$enable_winepulse_PulseAudio_Support" -eq 1; then
|
||||
patch_apply winepulse-PulseAudio_Support/0001-winepulse-handle-stream-create-failing-correctly.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0002-winepulse-Always-mute-buffer.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0003-winepulse-In-Shared-mode-track-device-position-in-by.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0004-winepulse-add-stub-for-GetPropValue.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0005-winepulse-return-PKEY_AudioEndpoint_PhysicalSpeakers.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0006-winepulse-Prefer-PulseAudio-driver.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0007-winepulse.drv-Use-delay-import-for-winealsa.drv.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0008-winepulse.drv-Use-a-separate-mainloop-and-ctx-for-pu.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0009-winepulse-expose-audio-devices-directly-to-programs.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0010-winepulse-implement-exclusive-mode.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0011-winepulse-fix-segfault-in-pulse_rd_loop.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0012-winepulse-implement-GetPropValue.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0013-winepulse-fetch-actual-program-name-if-possible.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0014-winepulse-return-PKEY_AudioEndpoint_PhysicalSpeakers.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0001-winepulse.drv-Use-delay-import-for-winealsa.drv.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0002-winepulse.drv-Use-a-separate-mainloop-and-ctx-for-pu.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0003-winepulse-expose-audio-devices-directly-to-programs.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0004-winepulse-implement-exclusive-mode.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0005-winepulse-fix-segfault-in-pulse_rd_loop.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0006-winepulse-implement-GetPropValue.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0007-winepulse-fetch-actual-program-name-if-possible.patch
|
||||
patch_apply winepulse-PulseAudio_Support/0008-winepulse-return-PKEY_AudioEndpoint_PhysicalSpeakers.patch
|
||||
(
|
||||
echo '+ { "Mark Harmstone", "winepulse: handle stream create failing correctly.", 1 },';
|
||||
echo '+ { "Andrew Eikum", "winepulse: Always mute buffer.", 1 },';
|
||||
echo '+ { "Andrew Eikum", "winepulse: In Shared mode, track device position in bytes.", 1 },';
|
||||
echo '+ { "Mark Harmstone", "winepulse: add stub for GetPropValue.", 1 },';
|
||||
echo '+ { "Mark Harmstone", "winepulse: return PKEY_AudioEndpoint_PhysicalSpeakers device prop.", 1 },';
|
||||
echo '+ { "Andrew Eikum", "winepulse: Prefer PulseAudio driver.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "winepulse.drv: Use delay import for winealsa.drv.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "winepulse.drv: Use a separate mainloop and ctx for pulse_test_connect.", 1 },';
|
||||
echo '+ { "Mark Harmstone", "winepulse: expose audio devices directly to programs.", 1 },';
|
||||
|
@ -1,30 +0,0 @@
|
||||
From f83ea4f5911613771d8a6629ddaf5ac39064cd12 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Harmstone <mark@harmstone.com>
|
||||
Date: Tue, 3 Nov 2015 16:21:41 -0600
|
||||
Subject: winepulse: handle stream create failing correctly
|
||||
|
||||
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 6b69488..3895f4c 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -753,6 +753,12 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
|
||||
ret = InterlockedIncrement(&number);
|
||||
sprintf(buffer, "audio stream #%i", ret);
|
||||
This->stream = pa_stream_new(pulse_ctx, buffer, &This->ss, &This->map);
|
||||
+
|
||||
+ if (!This->stream) {
|
||||
+ WARN("pa_stream_new returned error %i\n", pa_context_errno(pulse_ctx));
|
||||
+ return AUDCLNT_E_ENDPOINT_CREATE_FAILED;
|
||||
+ }
|
||||
+
|
||||
pa_stream_set_state_callback(This->stream, pulse_stream_state, This);
|
||||
pa_stream_set_buffer_attr_callback(This->stream, pulse_attr_update, This);
|
||||
pa_stream_set_moved_callback(This->stream, pulse_attr_update, This);
|
||||
--
|
||||
2.6.2
|
||||
|
@ -1,65 +0,0 @@
|
||||
From 59f7ed9326957728f0c3040b6c1f3a5cef5cde14 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Tue, 3 Nov 2015 16:21:48 -0600
|
||||
Subject: winepulse: Always mute buffer
|
||||
|
||||
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 24 ++++++++++++++----------
|
||||
1 file changed, 14 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 3895f4c..0e2bc08 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -572,6 +572,11 @@ static HRESULT pulse_stream_valid(ACImpl *This) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+static void silence_buffer(pa_sample_format_t format, BYTE *buffer, UINT32 bytes)
|
||||
+{
|
||||
+ memset(buffer, format == PA_SAMPLE_U8 ? 0x80 : 0, bytes);
|
||||
+}
|
||||
+
|
||||
static void dump_attr(const pa_buffer_attr *attr) {
|
||||
TRACE("maxlength: %u\n", attr->maxlength);
|
||||
TRACE("minreq: %u\n", attr->minreq);
|
||||
@@ -1315,7 +1320,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
|
||||
else {
|
||||
ACPacket *cur_packet = (ACPacket*)((char*)This->tmp_buffer + This->bufsize_bytes);
|
||||
BYTE *data = This->tmp_buffer;
|
||||
- memset(This->tmp_buffer, This->ss.format == PA_SAMPLE_U8 ? 0x80 : 0, This->bufsize_bytes);
|
||||
+ silence_buffer(This->ss.format, This->tmp_buffer, This->bufsize_bytes);
|
||||
list_init(&This->packet_free_head);
|
||||
list_init(&This->packet_filled_head);
|
||||
for (i = 0; i < capture_packets; ++i, ++cur_packet) {
|
||||
@@ -1985,18 +1990,17 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
|
||||
return AUDCLNT_E_INVALID_SIZE;
|
||||
}
|
||||
|
||||
- if (flags & AUDCLNT_BUFFERFLAGS_SILENT) {
|
||||
- if (This->ss.format == PA_SAMPLE_U8)
|
||||
- memset(This->tmp_buffer, 128, written_bytes);
|
||||
- else
|
||||
- memset(This->tmp_buffer, 0, written_bytes);
|
||||
- }
|
||||
-
|
||||
This->locked = 0;
|
||||
- if (This->locked_ptr)
|
||||
+ if (This->locked_ptr) {
|
||||
+ if (flags & AUDCLNT_BUFFERFLAGS_SILENT)
|
||||
+ silence_buffer(This->ss.format, This->locked_ptr, written_bytes);
|
||||
pa_stream_write(This->stream, This->locked_ptr, written_bytes, NULL, 0, PA_SEEK_RELATIVE);
|
||||
- else
|
||||
+ } else {
|
||||
+ if (flags & AUDCLNT_BUFFERFLAGS_SILENT)
|
||||
+ silence_buffer(This->ss.format, This->tmp_buffer, written_bytes);
|
||||
pa_stream_write(This->stream, This->tmp_buffer, written_bytes, pulse_free_noop, 0, PA_SEEK_RELATIVE);
|
||||
+ }
|
||||
+
|
||||
This->pad += written_bytes;
|
||||
This->locked_ptr = NULL;
|
||||
TRACE("Released %u, pad %zu\n", written_frames, This->pad / pa_frame_size(&This->ss));
|
||||
--
|
||||
2.6.2
|
||||
|
@ -1,51 +0,0 @@
|
||||
From 7479a9a46a748bd2a6b386bb20d3fe1c7c467d11 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Tue, 3 Nov 2015 16:21:53 -0600
|
||||
Subject: winepulse: In Shared mode, track device position in bytes
|
||||
|
||||
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 0e2bc08..e5ba869 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -2207,8 +2207,12 @@ static HRESULT WINAPI AudioClock_GetFrequency(IAudioClock *iface, UINT64 *freq)
|
||||
|
||||
pthread_mutex_lock(&pulse_lock);
|
||||
hr = pulse_stream_valid(This);
|
||||
- if (SUCCEEDED(hr))
|
||||
- *freq = This->ss.rate * pa_frame_size(&This->ss);
|
||||
+ if (SUCCEEDED(hr)) {
|
||||
+ if (This->share == AUDCLNT_SHAREMODE_SHARED)
|
||||
+ *freq = This->ss.rate * pa_frame_size(&This->ss);
|
||||
+ else
|
||||
+ *freq = This->ss.rate;
|
||||
+ }
|
||||
pthread_mutex_unlock(&pulse_lock);
|
||||
return hr;
|
||||
}
|
||||
@@ -2233,6 +2237,9 @@ static HRESULT WINAPI AudioClock_GetPosition(IAudioClock *iface, UINT64 *pos,
|
||||
|
||||
*pos = This->clock_written;
|
||||
|
||||
+ if (This->share == AUDCLNT_SHAREMODE_EXCLUSIVE)
|
||||
+ *pos /= pa_frame_size(&This->ss);
|
||||
+
|
||||
/* Make time never go backwards */
|
||||
if (*pos < This->clock_lastpos)
|
||||
*pos = This->clock_lastpos;
|
||||
@@ -2301,7 +2308,7 @@ static HRESULT WINAPI AudioClock2_GetDevicePosition(IAudioClock2 *iface,
|
||||
{
|
||||
ACImpl *This = impl_from_IAudioClock2(iface);
|
||||
HRESULT hr = AudioClock_GetPosition(&This->IAudioClock_iface, pos, qpctime);
|
||||
- if (SUCCEEDED(hr))
|
||||
+ if (SUCCEEDED(hr) && This->share == AUDCLNT_SHAREMODE_SHARED)
|
||||
*pos /= pa_frame_size(&This->ss);
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.6.2
|
||||
|
@ -1,50 +0,0 @@
|
||||
From f7f8676db491fee877020ad654fe46f0099e7274 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Harmstone <mark@harmstone.com>
|
||||
Date: Tue, 3 Nov 2015 16:22:09 -0600
|
||||
Subject: winepulse: add stub for GetPropValue
|
||||
|
||||
Edited by Maarten Lankhorst: No support for multiple devices in winepulse yet.
|
||||
|
||||
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 7 +++++++
|
||||
dlls/winepulse.drv/winepulse.drv.spec | 1 +
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index e5ba869..64e6c2a 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "initguid.h"
|
||||
#include "ks.h"
|
||||
#include "ksmedia.h"
|
||||
+#include "propkey.h"
|
||||
#include "mmdeviceapi.h"
|
||||
#include "audioclient.h"
|
||||
#include "endpointvolume.h"
|
||||
@@ -3198,3 +3199,9 @@ HRESULT WINAPI AUDDRV_GetAudioSessionManager(IMMDevice *device,
|
||||
*out = &This->IAudioSessionManager2_iface;
|
||||
return S_OK;
|
||||
}
|
||||
+
|
||||
+HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARIANT *out)
|
||||
+{
|
||||
+ TRACE("%s, (%s,%u), %p\n", wine_dbgstr_guid(guid), wine_dbgstr_guid(&prop->fmtid), prop->pid, out);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
diff --git a/dlls/winepulse.drv/winepulse.drv.spec b/dlls/winepulse.drv/winepulse.drv.spec
|
||||
index 288de87..7aeb175 100644
|
||||
--- a/dlls/winepulse.drv/winepulse.drv.spec
|
||||
+++ b/dlls/winepulse.drv/winepulse.drv.spec
|
||||
@@ -3,6 +3,7 @@
|
||||
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
|
||||
@ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint
|
||||
@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
|
||||
+@ stdcall -private GetPropValue(ptr ptr ptr) AUDDRV_GetPropValue
|
||||
|
||||
# WinMM driver functions
|
||||
@ stdcall -private DriverProc(long long long long long) winealsa.drv.DriverProc
|
||||
--
|
||||
2.6.2
|
||||
|
@ -1,159 +0,0 @@
|
||||
From 690e73e4d7201a602f06b6d7d6896ed766f1c9f2 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Harmstone <mark@harmstone.com>
|
||||
Date: Tue, 3 Nov 2015 16:22:28 -0600
|
||||
Subject: winepulse: return PKEY_AudioEndpoint_PhysicalSpeakers device prop
|
||||
|
||||
Edited by Maarten Lankhorst: No support for multiple devices in winepulse yet.
|
||||
|
||||
Synchronous static data initialization by Andrew Eikum <aeikum@codeweavers.com>
|
||||
|
||||
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 84 +++++++++++++++++++++++++++++++------------
|
||||
1 file changed, 61 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 64e6c2a..9aa1537 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -79,6 +79,8 @@ static pthread_mutex_t pulse_lock;
|
||||
static pthread_cond_t pulse_cond = PTHREAD_COND_INITIALIZER;
|
||||
static struct list g_sessions = LIST_INIT(g_sessions);
|
||||
|
||||
+static UINT g_phys_speakers_mask = 0;
|
||||
+
|
||||
/* Mixer format + period times */
|
||||
static WAVEFORMATEXTENSIBLE pulse_fmt[2];
|
||||
static REFERENCE_TIME pulse_min_period[2], pulse_def_period[2];
|
||||
@@ -330,13 +332,44 @@ static const enum pa_channel_position pulse_pos_from_wfx[] = {
|
||||
PA_CHANNEL_POSITION_TOP_REAR_RIGHT
|
||||
};
|
||||
|
||||
+static DWORD pulse_channel_map_to_channel_mask(const pa_channel_map *map) {
|
||||
+ int i;
|
||||
+ DWORD mask = 0;
|
||||
+
|
||||
+ for (i = 0; i < map->channels; ++i)
|
||||
+ switch (map->map[i]) {
|
||||
+ default: FIXME("Unhandled channel %s\n", pa_channel_position_to_string(map->map[i])); break;
|
||||
+ case PA_CHANNEL_POSITION_FRONT_LEFT: mask |= SPEAKER_FRONT_LEFT; break;
|
||||
+ case PA_CHANNEL_POSITION_MONO:
|
||||
+ case PA_CHANNEL_POSITION_FRONT_CENTER: mask |= SPEAKER_FRONT_CENTER; break;
|
||||
+ case PA_CHANNEL_POSITION_FRONT_RIGHT: mask |= SPEAKER_FRONT_RIGHT; break;
|
||||
+ case PA_CHANNEL_POSITION_REAR_LEFT: mask |= SPEAKER_BACK_LEFT; break;
|
||||
+ case PA_CHANNEL_POSITION_REAR_CENTER: mask |= SPEAKER_BACK_CENTER; break;
|
||||
+ case PA_CHANNEL_POSITION_REAR_RIGHT: mask |= SPEAKER_BACK_RIGHT; break;
|
||||
+ case PA_CHANNEL_POSITION_LFE: mask |= SPEAKER_LOW_FREQUENCY; break;
|
||||
+ case PA_CHANNEL_POSITION_SIDE_LEFT: mask |= SPEAKER_SIDE_LEFT; break;
|
||||
+ case PA_CHANNEL_POSITION_SIDE_RIGHT: mask |= SPEAKER_SIDE_RIGHT; break;
|
||||
+ case PA_CHANNEL_POSITION_TOP_CENTER: mask |= SPEAKER_TOP_CENTER; break;
|
||||
+ case PA_CHANNEL_POSITION_TOP_FRONT_LEFT: mask |= SPEAKER_TOP_FRONT_LEFT; break;
|
||||
+ case PA_CHANNEL_POSITION_TOP_FRONT_CENTER: mask |= SPEAKER_TOP_FRONT_CENTER; break;
|
||||
+ case PA_CHANNEL_POSITION_TOP_FRONT_RIGHT: mask |= SPEAKER_TOP_FRONT_RIGHT; break;
|
||||
+ case PA_CHANNEL_POSITION_TOP_REAR_LEFT: mask |= SPEAKER_TOP_BACK_LEFT; break;
|
||||
+ case PA_CHANNEL_POSITION_TOP_REAR_CENTER: mask |= SPEAKER_TOP_BACK_CENTER; break;
|
||||
+ case PA_CHANNEL_POSITION_TOP_REAR_RIGHT: mask |= SPEAKER_TOP_BACK_RIGHT; break;
|
||||
+ case PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER: mask |= SPEAKER_FRONT_LEFT_OF_CENTER; break;
|
||||
+ case PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: mask |= SPEAKER_FRONT_RIGHT_OF_CENTER; break;
|
||||
+ }
|
||||
+
|
||||
+ return mask;
|
||||
+}
|
||||
+
|
||||
static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
|
||||
WAVEFORMATEX *wfx = &fmt->Format;
|
||||
pa_stream *stream;
|
||||
pa_channel_map map;
|
||||
pa_sample_spec ss;
|
||||
pa_buffer_attr attr;
|
||||
- int ret, i;
|
||||
+ int ret;
|
||||
unsigned int length = 0;
|
||||
|
||||
pa_channel_map_init_auto(&map, 2, PA_CHANNEL_MAP_ALSA);
|
||||
@@ -401,28 +434,7 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
|
||||
else
|
||||
fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
|
||||
|
||||
- fmt->dwChannelMask = 0;
|
||||
- for (i = 0; i < map.channels; ++i)
|
||||
- switch (map.map[i]) {
|
||||
- default: FIXME("Unhandled channel %s\n", pa_channel_position_to_string(map.map[i])); break;
|
||||
- case PA_CHANNEL_POSITION_FRONT_LEFT: fmt->dwChannelMask |= SPEAKER_FRONT_LEFT; break;
|
||||
- case PA_CHANNEL_POSITION_MONO:
|
||||
- case PA_CHANNEL_POSITION_FRONT_CENTER: fmt->dwChannelMask |= SPEAKER_FRONT_CENTER; break;
|
||||
- case PA_CHANNEL_POSITION_FRONT_RIGHT: fmt->dwChannelMask |= SPEAKER_FRONT_RIGHT; break;
|
||||
- case PA_CHANNEL_POSITION_REAR_LEFT: fmt->dwChannelMask |= SPEAKER_BACK_LEFT; break;
|
||||
- case PA_CHANNEL_POSITION_REAR_CENTER: fmt->dwChannelMask |= SPEAKER_BACK_CENTER; break;
|
||||
- case PA_CHANNEL_POSITION_REAR_RIGHT: fmt->dwChannelMask |= SPEAKER_BACK_RIGHT; break;
|
||||
- case PA_CHANNEL_POSITION_LFE: fmt->dwChannelMask |= SPEAKER_LOW_FREQUENCY; break;
|
||||
- case PA_CHANNEL_POSITION_SIDE_LEFT: fmt->dwChannelMask |= SPEAKER_SIDE_LEFT; break;
|
||||
- case PA_CHANNEL_POSITION_SIDE_RIGHT: fmt->dwChannelMask |= SPEAKER_SIDE_RIGHT; break;
|
||||
- case PA_CHANNEL_POSITION_TOP_CENTER: fmt->dwChannelMask |= SPEAKER_TOP_CENTER; break;
|
||||
- case PA_CHANNEL_POSITION_TOP_FRONT_LEFT: fmt->dwChannelMask |= SPEAKER_TOP_FRONT_LEFT; break;
|
||||
- case PA_CHANNEL_POSITION_TOP_FRONT_CENTER: fmt->dwChannelMask |= SPEAKER_TOP_FRONT_CENTER; break;
|
||||
- case PA_CHANNEL_POSITION_TOP_FRONT_RIGHT: fmt->dwChannelMask |= SPEAKER_TOP_FRONT_RIGHT; break;
|
||||
- case PA_CHANNEL_POSITION_TOP_REAR_LEFT: fmt->dwChannelMask |= SPEAKER_TOP_BACK_LEFT; break;
|
||||
- case PA_CHANNEL_POSITION_TOP_REAR_CENTER: fmt->dwChannelMask |= SPEAKER_TOP_BACK_CENTER; break;
|
||||
- case PA_CHANNEL_POSITION_TOP_REAR_RIGHT: fmt->dwChannelMask |= SPEAKER_TOP_BACK_RIGHT; break;
|
||||
- }
|
||||
+ fmt->dwChannelMask = pulse_channel_map_to_channel_mask(&map);
|
||||
}
|
||||
|
||||
static HRESULT pulse_connect(void)
|
||||
@@ -492,6 +504,14 @@ fail:
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
+/* For default Pulseaudio render device, OR together all of the
|
||||
+ * PKEY_AudioEndpoint_PhysicalSpeakers values of the sinks. */
|
||||
+static void pulse_phys_speakers_cb(pa_context *c, const pa_sink_info *i, int eol, void *userdata)
|
||||
+{
|
||||
+ if (i)
|
||||
+ g_phys_speakers_mask |= pulse_channel_map_to_channel_mask(&i->channel_map);
|
||||
+}
|
||||
+
|
||||
/* some poorly-behaved applications call audio functions during DllMain, so we
|
||||
* have to do as much as possible without creating a new thread. this function
|
||||
* sets up a synchronous connection to verify the server is running and query
|
||||
@@ -501,6 +521,7 @@ static HRESULT pulse_test_connect(void)
|
||||
int len, ret;
|
||||
WCHAR path[PATH_MAX], *name;
|
||||
char *str;
|
||||
+ pa_operation *o;
|
||||
|
||||
pulse_ml = pa_mainloop_new();
|
||||
|
||||
@@ -549,6 +570,15 @@ static HRESULT pulse_test_connect(void)
|
||||
pulse_probe_settings(1, &pulse_fmt[0]);
|
||||
pulse_probe_settings(0, &pulse_fmt[1]);
|
||||
|
||||
+ g_phys_speakers_mask = 0;
|
||||
+ o = pa_context_get_sink_info_list(pulse_ctx, &pulse_phys_speakers_cb, NULL);
|
||||
+ if (o) {
|
||||
+ while (pa_mainloop_iterate(pulse_ml, 1, &ret) >= 0 &&
|
||||
+ pa_operation_get_state(o) == PA_OPERATION_RUNNING)
|
||||
+ {}
|
||||
+ pa_operation_unref(o);
|
||||
+ }
|
||||
+
|
||||
pa_context_unref(pulse_ctx);
|
||||
pulse_ctx = NULL;
|
||||
pa_mainloop_free(pulse_ml);
|
||||
@@ -3203,5 +3233,13 @@ HRESULT WINAPI AUDDRV_GetAudioSessionManager(IMMDevice *device,
|
||||
HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARIANT *out)
|
||||
{
|
||||
TRACE("%s, (%s,%u), %p\n", wine_dbgstr_guid(guid), wine_dbgstr_guid(&prop->fmtid), prop->pid, out);
|
||||
+
|
||||
+ if (IsEqualGUID(guid, &pulse_render_guid) && IsEqualPropertyKey(*prop, PKEY_AudioEndpoint_PhysicalSpeakers)) {
|
||||
+ out->vt = VT_UI4;
|
||||
+ out->u.ulVal = g_phys_speakers_mask;
|
||||
+
|
||||
+ return out->u.ulVal ? S_OK : E_FAIL;
|
||||
+ }
|
||||
+
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
--
|
||||
2.6.2
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 9d4e023a3c2f57e3e85ac406135a8a41064b3311 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Eikum <aeikum@codeweavers.com>
|
||||
Date: Tue, 3 Nov 2015 16:22:53 -0600
|
||||
Subject: winepulse: Prefer PulseAudio driver
|
||||
|
||||
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 9aa1537..b2f83c8 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -869,7 +869,7 @@ int WINAPI AUDDRV_GetPriority(void)
|
||||
pthread_mutex_lock(&pulse_lock);
|
||||
hr = pulse_test_connect();
|
||||
pthread_mutex_unlock(&pulse_lock);
|
||||
- return SUCCEEDED(hr) ? Priority_Low : Priority_Unavailable;
|
||||
+ return SUCCEEDED(hr) ? Priority_Preferred : Priority_Unavailable;
|
||||
}
|
||||
|
||||
HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient **out)
|
||||
--
|
||||
2.6.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user