Added winepulse-aux_channels patchset

This commit is contained in:
Alistair Leslie-Hughes 2022-06-20 13:13:45 +10:00
parent 776c47da46
commit 850b7f6540
3 changed files with 57 additions and 0 deletions

View File

@ -243,6 +243,7 @@ patch_enable_all ()
enable_winemenubuilder_integration="$1"
enable_wineps_drv_PostScript_Fixes="$1"
enable_winepulse_PulseAudio_Support="$1"
enable_winepulse_aux_channels="$1"
enable_winex11_CandidateWindowPos="$1"
enable_winex11_MWM_Decorations="$1"
enable_winex11_UpdateLayeredWindow="$1"
@ -753,6 +754,9 @@ patch_enable ()
winepulse-PulseAudio_Support)
enable_winepulse_PulseAudio_Support="$2"
;;
winepulse-aux_channels)
enable_winepulse_aux_channels="$2"
;;
winex11-CandidateWindowPos)
enable_winex11_CandidateWindowPos="$2"
;;
@ -3659,6 +3663,18 @@ if test "$enable_winepulse_PulseAudio_Support" -eq 1; then
patch_apply winepulse-PulseAudio_Support/0001-winepulse.drv-Use-a-separate-mainloop-and-ctx-for-pu.patch
fi
# Patchset winepulse-aux_channels
# |
# | This patchset fixes the following Wine bugs:
# | * [#52572] Support PulseAudio channels aux0 and aux1.
# |
# | Modified files:
# | * dlls/winepulse.drv/pulse.c
# |
if test "$enable_winepulse_aux_channels" -eq 1; then
patch_apply winepulse-aux_channels/0001-winepulse-Add-aux0-and-aux1-channels.patch
fi
# Patchset winex11-CandidateWindowPos
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,40 @@
From abc3fcb614b68ecf9d92d27da9629bd8f4ca93df Mon Sep 17 00:00:00 2001
From: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Date: Wed, 30 Mar 2022 03:12:30 -0400
Subject: [PATCH] winepulse: Add aux0 and aux1 channels.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52572
---
dlls/winepulse.drv/pulse.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c
index 0e504b6b6dd..e32b4eef2da 100644
--- a/dlls/winepulse.drv/pulse.c
+++ b/dlls/winepulse.drv/pulse.c
@@ -401,9 +401,11 @@ static UINT pulse_channel_map_to_channel_mask(const pa_channel_map *map)
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_AUX0:
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_AUX1:
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;
@@ -884,7 +886,9 @@ static const enum pa_channel_position pulse_pos_from_wfx[] = {
PA_CHANNEL_POSITION_TOP_FRONT_RIGHT,
PA_CHANNEL_POSITION_TOP_REAR_LEFT,
PA_CHANNEL_POSITION_TOP_REAR_CENTER,
- PA_CHANNEL_POSITION_TOP_REAR_RIGHT
+ PA_CHANNEL_POSITION_TOP_REAR_RIGHT,
+ PA_CHANNEL_POSITION_AUX0,
+ PA_CHANNEL_POSITION_AUX1
};
static HRESULT pulse_spec_from_waveformat(struct pulse_stream *stream, const WAVEFORMATEX *fmt)
--
2.35.1

View File

@ -0,0 +1 @@
Fixes: [52572] Support PulseAudio channels aux0 and aux1.