rpms/wine/devel adding-pulseaudio-to-winecfg.patch, NONE, 1.1 winepulse-0.17-configure.ac.patch, NONE, 1.1 winepulse-0.20.patch, NONE, 1.1 .cvsignore, 1.70, 1.71 README-FEDORA-PULSEAUDIO, 1.3, 1.4 sources, 1.71, 1.72 wine.spec, 1.97, 1.98 wine-alsa-pulseaudio.patch, 1.1, NONE wine-pulseaudio-waveout.patch, 1.1, NONE wine-pulseaudio-winecfg.patch, 1.1, NONE wine-pulseaudio.patch, 1.1, NONE wine-pulseaudio.sh, 1.2, NONE

Andreas Bierfert awjb at fedoraproject.org
Tue Feb 24 20:45:39 UTC 2009


Author: awjb

Update of /cvs/pkgs/rpms/wine/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10552/devel

Modified Files:
	.cvsignore README-FEDORA-PULSEAUDIO sources wine.spec 
Added Files:
	adding-pulseaudio-to-winecfg.patch 
	winepulse-0.17-configure.ac.patch winepulse-0.20.patch 
Removed Files:
	wine-alsa-pulseaudio.patch wine-pulseaudio-waveout.patch 
	wine-pulseaudio-winecfg.patch wine-pulseaudio.patch 
	wine-pulseaudio.sh 
Log Message:
- version upgrade
- update winepulse patches


adding-pulseaudio-to-winecfg.patch:

--- NEW FILE adding-pulseaudio-to-winecfg.patch ---
diff --git a/programs/winecfg/Bg.rc b/programs/winecfg/Bg.rc
index 8861657..cf91012 100644
--- a/programs/winecfg/Bg.rc
+++ b/programs/winecfg/Bg.rc
@@ -274,6 +274,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Basic"
     IDS_ACCEL_EMULATION         "Emulation"
+    IDS_DRIVER_PULSE             "PulseAudio Driver"
     IDS_DRIVER_ALSA             "ALSA Driver"
     IDS_DRIVER_ESOUND           "EsounD Driver"
     IDS_DRIVER_OSS              "OSS Driver"
diff --git a/programs/winecfg/Cs.rc b/programs/winecfg/Cs.rc
index 07f035f..8897237 100644
--- a/programs/winecfg/Cs.rc
+++ b/programs/winecfg/Cs.rc
@@ -273,6 +273,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standardní"
     IDS_ACCEL_BASIC             "Základní"
     IDS_ACCEL_EMULATION         "Emulace"
+    IDS_DRIVER_PULSE             "Ovladaè PulseAudio"
     IDS_DRIVER_ALSA             "Ovladaè ALSA"
     IDS_DRIVER_ESOUND           "Ovladaè EsounD"
     IDS_DRIVER_OSS              "Ovladaè OSS"
diff --git a/programs/winecfg/Da.rc b/programs/winecfg/Da.rc
index 1d655ad..a1c9653 100644
--- a/programs/winecfg/Da.rc
+++ b/programs/winecfg/Da.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Grundlæggende"
     IDS_ACCEL_EMULATION         "Emuléring"
+    IDS_DRIVER_PULSE             "PulseAudio-driver"
     IDS_DRIVER_ALSA             "ALSA-driver"
     IDS_DRIVER_ESOUND           "EsounD-driver"
     IDS_DRIVER_OSS              "OSS-driver"
diff --git a/programs/winecfg/De.rc b/programs/winecfg/De.rc
index 9ed3d63..614247b 100644
--- a/programs/winecfg/De.rc
+++ b/programs/winecfg/De.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Einfach"
     IDS_ACCEL_EMULATION         "Emulation"
+    IDS_DRIVER_PULSE             "PulseAudio-Treiber"
     IDS_DRIVER_ALSA             "ALSA-Treiber"
     IDS_DRIVER_ESOUND           "EsounD-Treiber"
     IDS_DRIVER_OSS              "OSS-Treiber"
diff --git a/programs/winecfg/En.rc b/programs/winecfg/En.rc
index 5743ba3..b165a81 100644
--- a/programs/winecfg/En.rc
+++ b/programs/winecfg/En.rc
@@ -270,6 +270,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Basic"
     IDS_ACCEL_EMULATION         "Emulation"
+    IDS_DRIVER_PULSE             "PulseAudio Driver"
     IDS_DRIVER_ALSA             "ALSA Driver"
     IDS_DRIVER_ESOUND           "EsounD Driver"
     IDS_DRIVER_OSS              "OSS Driver"
diff --git a/programs/winecfg/Es.rc b/programs/winecfg/Es.rc
index 440ea71..dd1b764 100644
--- a/programs/winecfg/Es.rc
+++ b/programs/winecfg/Es.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Estándar"
     IDS_ACCEL_BASIC             "Básica"
     IDS_ACCEL_EMULATION         "Emulación"
+    IDS_DRIVER_PULSE             "Manejador PulseAudio"
     IDS_DRIVER_ALSA             "Manejador ALSA"
     IDS_DRIVER_ESOUND           "Manejador EsounD"
     IDS_DRIVER_OSS              "Manejador OSS"
diff --git a/programs/winecfg/Fi.rc b/programs/winecfg/Fi.rc
index 1d761f8..e1b1583 100644
--- a/programs/winecfg/Fi.rc
+++ b/programs/winecfg/Fi.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Basic"
     IDS_ACCEL_EMULATION         "Emulation"
+    IDS_DRIVER_PULSE             "PulseAudio Driver"
     IDS_DRIVER_ALSA             "ALSA Driver"
     IDS_DRIVER_ESOUND           "EsounD Driver"
     IDS_DRIVER_OSS              "OSS Driver"
diff --git a/programs/winecfg/Fr.rc b/programs/winecfg/Fr.rc
index 818c50f..97a1f44 100644
--- a/programs/winecfg/Fr.rc
+++ b/programs/winecfg/Fr.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Basique"
     IDS_ACCEL_EMULATION         "Émulation"
+    IDS_DRIVER_PULSE             "Pilote PulseAudio"
     IDS_DRIVER_ALSA             "Pilote ALSA"
     IDS_DRIVER_ESOUND           "Pilote EsounD"
     IDS_DRIVER_OSS              "Pilote OSS"
diff --git a/programs/winecfg/Hu.rc b/programs/winecfg/Hu.rc
index 5afbf91..4131f5f 100644
--- a/programs/winecfg/Hu.rc
+++ b/programs/winecfg/Hu.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Basic"
     IDS_ACCEL_EMULATION         "Emulation"
+    IDS_DRIVER_PULSE             "PulseAudio Driver"
     IDS_DRIVER_ALSA             "ALSA Driver"
     IDS_DRIVER_ESOUND           "EsounD Driver"
     IDS_DRIVER_OSS              "OSS Driver"
diff --git a/programs/winecfg/Ja.rc b/programs/winecfg/Ja.rc
index 8eaa603..543ed2c 100644
--- a/programs/winecfg/Ja.rc
+++ b/programs/winecfg/Ja.rc
@@ -273,6 +273,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "標準"
     IDS_ACCEL_BASIC             "基本"
     IDS_ACCEL_EMULATION         "エミュレーション"
+    IDS_DRIVER_PULSE             "PulseAudio Driver"
     IDS_DRIVER_ALSA             "ALSA Driver"
     IDS_DRIVER_ESOUND           "EsounD Driver"
     IDS_DRIVER_OSS              "OSS Driver"
diff --git a/programs/winecfg/Ko.rc b/programs/winecfg/Ko.rc
index ca94b5b..a79cc03 100644
--- a/programs/winecfg/Ko.rc
+++ b/programs/winecfg/Ko.rc
@@ -272,6 +272,7 @@ BEGIN
    IDS_ACCEL_STANDARD          "Ç¥ÁØ"
    IDS_ACCEL_BASIC             "񃧯"
    IDS_ACCEL_EMULATION         "¾Ö¹Ä·¹À̼Ç"
+    IDS_DRIVER_PULSE             "PulseAudio µå¶óÀ̹ö"
    IDS_DRIVER_ALSA             "ALSA µå¶óÀ̹ö"
    IDS_DRIVER_ESOUND           "EsounD µå¶óÀ̹ö"
    IDS_DRIVER_OSS              "OSS µå¶óÀ̹ö"
diff --git a/programs/winecfg/Nl.rc b/programs/winecfg/Nl.rc
index fb91290..b23e919 100644
--- a/programs/winecfg/Nl.rc
+++ b/programs/winecfg/Nl.rc
@@ -270,6 +270,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standaard"
     IDS_ACCEL_BASIC             "Eenvoudig"
     IDS_ACCEL_EMULATION         "Emulatie"
+    IDS_DRIVER_PULSE             "PulseAudio Stuurprogramma"
     IDS_DRIVER_ALSA             "ALSA Stuurprogramma"
     IDS_DRIVER_ESOUND           "EsounD Stuurprogramma"
     IDS_DRIVER_OSS              "OSS Stuurprogramma"
diff --git a/programs/winecfg/No.rc b/programs/winecfg/No.rc
index aaa64c3..9dd3572 100644
--- a/programs/winecfg/No.rc
+++ b/programs/winecfg/No.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Grunnleggende"
     IDS_ACCEL_EMULATION         "Emulering"
+    IDS_DRIVER_PULSE             "PulseAudio-driver"
     IDS_DRIVER_ALSA             "ALSA-driver"
     IDS_DRIVER_ESOUND           "EsounD-driver"
     IDS_DRIVER_OSS              "OSS-driver"
diff --git a/programs/winecfg/Pl.rc b/programs/winecfg/Pl.rc
index c426443..e3bf093 100644
--- a/programs/winecfg/Pl.rc
+++ b/programs/winecfg/Pl.rc
@@ -271,6 +271,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standardowe"
     IDS_ACCEL_BASIC             "Podstawowe"
     IDS_ACCEL_EMULATION         "Emulacja"
+    IDS_DRIVER_PULSE             "Sterownik PulseAudio"
     IDS_DRIVER_ALSA             "Sterownik ALSA"
     IDS_DRIVER_ESOUND           "Sterownik EsounD"
     IDS_DRIVER_OSS              "Sterownik OSS"
diff --git a/programs/winecfg/Pt.rc b/programs/winecfg/Pt.rc
index 830cabf..0ed1dbd 100644
--- a/programs/winecfg/Pt.rc
+++ b/programs/winecfg/Pt.rc
@@ -465,6 +465,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Padrão"
     IDS_ACCEL_BASIC             "Básico"
     IDS_ACCEL_EMULATION         "Emulação"
+    IDS_DRIVER_PULSE             "Controlador PulseAudio"
     IDS_DRIVER_ALSA             "Controlador ALSA"
     IDS_DRIVER_ESOUND           "Controlador EsounD"
     IDS_DRIVER_OSS              "Controlador OSS"
diff --git a/programs/winecfg/Ro.rc b/programs/winecfg/Ro.rc
index a4b0cad..c065d36 100644
--- a/programs/winecfg/Ro.rc
+++ b/programs/winecfg/Ro.rc
@@ -270,6 +270,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "De basă"
     IDS_ACCEL_EMULATION         "Emulare"
+    IDS_DRIVER_PULSE             "Driver PulseAudio"
     IDS_DRIVER_ALSA             "Driver ALSA"
     IDS_DRIVER_ESOUND           "Driver Esound"
     IDS_DRIVER_OSS              "Driver OSS"
diff --git a/programs/winecfg/Ru.rc b/programs/winecfg/Ru.rc
index 782e1fd..f516399 100644
--- a/programs/winecfg/Ru.rc
+++ b/programs/winecfg/Ru.rc
@@ -272,6 +272,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Ñòàíäàðòíîå"
     IDS_ACCEL_BASIC             "Ìèíèìàëüíîå"
     IDS_ACCEL_EMULATION         "Ýìóëÿöèÿ"
+    IDS_DRIVER_PULSE             "PulseAudio äðàéâåð"
     IDS_DRIVER_ALSA             "ALSA äðàéâåð"
     IDS_DRIVER_ESOUND           "EsounD äðàéâåð"
     IDS_DRIVER_OSS              "OSS äðàéâåð"
diff --git a/programs/winecfg/Si.rc b/programs/winecfg/Si.rc
index 0bd04ef..c8bd35e 100644
--- a/programs/winecfg/Si.rc
+++ b/programs/winecfg/Si.rc
@@ -270,6 +270,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standardno"
     IDS_ACCEL_BASIC             "Osnovno"
     IDS_ACCEL_EMULATION         "Emulacija"
+    IDS_DRIVER_PULSE             "PulseAudio gonilnik"
     IDS_DRIVER_ALSA             "ALSA gonilnik"
     IDS_DRIVER_ESOUND           "EsounD gonilnik"
     IDS_DRIVER_OSS              "OSS gonilnik"
diff --git a/programs/winecfg/Sv.rc b/programs/winecfg/Sv.rc
index 49bb236..7efe2c0 100644
--- a/programs/winecfg/Sv.rc
+++ b/programs/winecfg/Sv.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standard"
     IDS_ACCEL_BASIC             "Grundläggande"
     IDS_ACCEL_EMULATION         "Emulering"
+    IDS_DRIVER_PULSE             "PulseAudio-drivrutin"
     IDS_DRIVER_ALSA             "ALSA-drivrutin"
     IDS_DRIVER_ESOUND           "EsounD-drivrutin"
     IDS_DRIVER_OSS              "OSS-drivrutin"
diff --git a/programs/winecfg/Tr.rc b/programs/winecfg/Tr.rc
index 4157f86..1be23c5 100644
--- a/programs/winecfg/Tr.rc
+++ b/programs/winecfg/Tr.rc
@@ -268,6 +268,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "Standart"
     IDS_ACCEL_BASIC             "Temel"
     IDS_ACCEL_EMULATION         "Taklit"
+    IDS_DRIVER_PULSE             "PulseAudio Sürücüsü"
     IDS_DRIVER_ALSA             "ALSA Sürücüsü"
     IDS_DRIVER_ESOUND           "EsounD Sürücüsü"
     IDS_DRIVER_OSS              "OSS Sürücüsü"
diff --git a/programs/winecfg/Zh.rc b/programs/winecfg/Zh.rc
index 4c18e99..029a26d 100644
--- a/programs/winecfg/Zh.rc
+++ b/programs/winecfg/Zh.rc
@@ -271,6 +271,7 @@ BEGIN
     IDS_ACCEL_STANDARD          "标准"
     IDS_ACCEL_BASIC             "基本"
     IDS_ACCEL_EMULATION         "软件模拟"
+    IDS_DRIVER_PULSE             "PulseAudio 驱动"
     IDS_DRIVER_ALSA             "ALSA 驱动"
     IDS_DRIVER_ESOUND           "EsounD 驱动"
     IDS_DRIVER_OSS              "OSS 驱动"
diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index 8e966a5..9c2cde3 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
@@ -88,6 +88,7 @@ typedef struct
 } AUDIO_DRIVER;
 
 static const AUDIO_DRIVER sAudioDrivers[] = {
+  {IDS_DRIVER_PULSE,      "pulse"},
   {IDS_DRIVER_ALSA,      "alsa"},
   {IDS_DRIVER_OSS,       "oss"},
   {IDS_DRIVER_COREAUDIO, "coreaudio"},
diff --git a/programs/winecfg/libraries.c b/programs/winecfg/libraries.c
index 6abe04d..2fa6a95 100644
--- a/programs/winecfg/libraries.c
+++ b/programs/winecfg/libraries.c
@@ -67,6 +67,7 @@ static const char * const builtin_only[] =
     "user32",
     "vdmdbg",
     "w32skrnl",
+    "winepulse.drv",
     "winealsa.drv",
     "wineaudioio.drv",
     "wined3d",
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index a18fe76..1c4a1e7 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -182,7 +182,7 @@
 #define IDS_ACCEL_BASIC                 8302
 #define IDS_ACCEL_EMULATION             8303
 #define IDS_DRIVER_ALSA                 8304
-
+#define IDS_DRIVER_PULSE                 8305
 #define IDS_DRIVER_ESOUND               8306
 #define IDS_DRIVER_OSS                  8307
 #define IDS_DRIVER_JACK                 8308

winepulse-0.17-configure.ac.patch:

--- NEW FILE winepulse-0.17-configure.ac.patch ---
diff --git a/configure.ac b/configure.ac
index 57ec39d..2ca94ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,7 @@ AC_ARG_WITH(png,       AS_HELP_STRING([--without-png],[do not use PNG]),
             [if test "x$withval" = "xno"; then ac_cv_header_png_h=no; fi])
 AC_ARG_WITH(pthread,   AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
             [if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
+AC_ARG_WITH(pulse,     AC_HELP_STRING([--without-pulse],[do not use PulseAudio sound support]))
 AC_ARG_WITH(sane,      AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
 AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
             [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
@@ -1186,6 +1187,24 @@ then
     CFLAGS="$save_CFLAGS"
 fi
 
+dnl **** Check for PulseAudio ****
+if test "x$with_pulse" != "xno"; then
+    if test "$PKG_CONFIG" != "false"; then
+	AC_MSG_CHECKING([for pulseaudio >= 0.9.8])
+	if "$PKG_CONFIG" --atleast-version=0.9.8 libpulse; then
+	    have_pulseaudio="yes"
+        else
+	    have_pulseaudio="no"
+	fi
+	AC_MSG_RESULT([$have_pulseaudio])
+	if test x"$have_pulseaudio" = xyes; then
+	    ac_pulse_libs=`$PKG_CONFIG --libs libpulse`
+	    AC_DEFINE([HAVE_PULSEAUDIO], 1, [define this if you have pulseaudio])
+	    AC_SUBST(PULSELIBS, "$ac_pulse_libs")
+	fi
+    fi
+fi
+
 dnl **** Check for ALSA 1.x ****
 AC_SUBST(ALSALIBS,"")
 if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
@@ -1291,7 +1310,7 @@ dnl **** Check for libodbc ****
 WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.$LIBEXT"])])
 
 dnl **** Check for any sound system ****
-if test "x$ALSALIBS$AUDIOIOLIBS$COREAUDIO$NASLIBS$ESDLIBS$ac_cv_lib_soname_jack" = "x" -a \
+if test "x$ALSALIBS$AUDIOIOLIBS$COREAUDIO$NASLIBS$ESDLIBS$PULSELIBS$ac_cv_lib_soname_jack" = "x" -a \
         "$ac_cv_header_sys_soundcard_h" != "yes" -a \
         "$ac_cv_header_machine_soundcard_h" != "yes" -a \
         "$ac_cv_header_soundcard_h" != "yes" -a \
@@ -2223,6 +2242,7 @@ WINE_CONFIG_MAKEFILE([dlls/winemp3.acm/Makefile],[dlls/Makedll.rules],[dlls],[AL
 WINE_CONFIG_MAKEFILE([dlls/winenas.drv/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/wineoss.drv/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/wineps.drv/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
+WINE_CONFIG_MAKEFILE([dlls/winepulse.drv/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/winequartz.drv/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/winex11.drv/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/wing32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])

winepulse-0.20.patch:

--- NEW FILE winepulse-0.20.patch ---
diff --git a/dlls/winepulse.drv/Makefile.in b/dlls/winepulse.drv/Makefile.in
new file mode 100644
index 0000000..327f225
--- /dev/null
+++ b/dlls/winepulse.drv/Makefile.in
@@ -0,0 +1,16 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = winepulse.drv
+IMPORTS   = dxguid uuid winmm user32 advapi32 kernel32
+EXTRALIBS = @PULSELIBS@
+
+C_SRCS = dsoutput.c \
+	waveout.c \
+	wavein.c \
+	pulse.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/winepulse.drv/dsoutput.c b/dlls/winepulse.drv/dsoutput.c
new file mode 100644
index 0000000..5086917
--- /dev/null
+++ b/dlls/winepulse.drv/dsoutput.c
@@ -0,0 +1,568 @@
+/*
+ * Wine Driver for PulseAudio - DSound Output Functionality
+ * http://pulseaudio.org/
+ *
+ * Copyright	2009 Arthur Talyor <theycallhimart at gmail.com>
+ *
+ * Conatins code from other wine multimedia drivers.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "winerror.h"
+#include "mmddk.h"
+#include "dsound.h"
+#include "dsdriver.h"
+#include "winreg.h"
+
+#include <winepulse.h>
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dspulse);
+
+#if HAVE_PULSEAUDIO
+
+/*======================================================================*
+ *                  Low level DSOUND implementation			*
+ *======================================================================*/
+
+/* Fragment lengths try to be a power of two close to 10ms worth of data. See
+ * dlls/dsound/mixer.c
+ */
+static int fragment_length(pa_sample_spec *s) {
+    if (s->rate <= 12800)
+        return 128 * pa_frame_size(s);
+
+    if (s->rate <= 25600)
+        return 256 * pa_frame_size(s);
+
+    if (s->rate <= 51200)
+        return 512 * pa_frame_size(s);
+
+    return 1024 * pa_frame_size(s);
+}
+
+/* Callback from the pulse thread for stream data */
+static void DSPULSE_BufferReadCallback(pa_stream *s, size_t nbytes, void *userdata) {
+    IDsDriverBufferImpl *This = (IDsDriverBufferImpl *)userdata;
+
+    if (!This->buffer)
+        return;
+
+    /* Fraglens are always powers of 2 */
+    nbytes+= This->fraglen - 1;
+    nbytes&= ~(This->fraglen - 1);
+    /* If we advance more than 10 fragments at a time it appears that the buffer
+     * pointer is never advancing because of wrap-around. Evil magic numbers. */
+    if (nbytes > This->fraglen * 6)
+	nbytes = This->fraglen * 6;
+
+    TRACE("Reading %u bytes.\n", nbytes);
+
+    if (This->buffer_read_offset + nbytes > This->buffer_length) {
+	size_t write_length = This->buffer_length - This->buffer_read_offset;
+	if (nbytes > This->buffer_length)
+	    nbytes = This->buffer_length;
+	nbytes -= write_length;
+	pa_stream_write(s, This->buffer + This->buffer_read_offset, write_length, NULL, 0, PA_SEEK_RELATIVE);
+	pa_stream_write(s, This->buffer, nbytes, NULL, 0, PA_SEEK_RELATIVE);
+	This->buffer_read_offset = nbytes;
+    } else {
+	pa_stream_write(s, This->buffer + This->buffer_read_offset, nbytes, NULL, 0, PA_SEEK_RELATIVE);
+	This->buffer_read_offset += nbytes;
+    }
+
+    This->buffer_read_offset %= This->buffer_length;
+}
+
+/* Called when the stream underruns. Just for information */
+static void DSPULSE_BufferUnderflowCallback(pa_stream *s, void *userdata) {
+    WARN("(%p) underrun.\n", userdata);
+}
+
+/* Connects a stream to the server for use in setting the sample format or
+ * stream creation. Does not update IDsDriverBufferImpl->fraglen */
+static HRESULT DSPULSE_ConnectStream(IDsDriverBufferImpl* This) {
+    pa_buffer_attr ba_request;
+    const pa_buffer_attr *ba_obtained;
+    char c[PA_SAMPLE_SPEC_SNPRINT_MAX];
+    pa_stream_flags_t flags = PA_STREAM_START_CORKED;
+
+#if PA_API_VERSION >= 12
+    flags |= PA_STREAM_EARLY_REQUESTS;
+#endif
+
+    pa_sample_spec_snprint(c, PA_SAMPLE_SPEC_SNPRINT_MAX, &This->sample_spec);
+    TRACE("Sample spec %s fragment size %u.\n", c, This->fraglen);
+
+    ba_request.tlength = This->fraglen * 4;
+    ba_request.minreq = This->fraglen / 2;
+    ba_request.prebuf = (uint32_t) -1; /* same as tlength */
+    ba_request.maxlength = This->buffer_length;
+
+    TRACE("Asking for buffer tlength:%u (%llums) minreq:%u (%llums)\n",
+        ba_request.tlength, pa_bytes_to_usec(ba_request.tlength, &This->sample_spec)/1000,
+        ba_request.minreq, pa_bytes_to_usec(ba_request.minreq, &This->sample_spec)/1000);
+
+    This->stream = pa_stream_new(PULSE_context, "DirectSound Buffer", &This->sample_spec, NULL);
+    if (!This->stream) return DSERR_BADFORMAT;
+
+    pa_stream_set_state_callback(This->stream, PULSE_StreamStateCallback, This);
+    pa_stream_set_write_callback(This->stream, DSPULSE_BufferReadCallback, This);
+    pa_stream_set_underflow_callback(This->stream, DSPULSE_BufferUnderflowCallback, This);
+
+    TRACE("Attempting to connect (%p)->stream for playback on %s\n", This, WOutDev[This->drv->wDevID].device_name);
+    pa_stream_connect_playback(This->stream, WOutDev[This->drv->wDevID].device_name, &ba_request, flags, NULL, NULL);
+    for (;;) {
+        pa_context_state_t cstate = pa_context_get_state(PULSE_context);
+        pa_stream_state_t sstate = pa_stream_get_state(This->stream);
+
+	if (cstate == PA_CONTEXT_FAILED || cstate == PA_CONTEXT_TERMINATED ||
+	    sstate == PA_STREAM_FAILED || sstate == PA_STREAM_TERMINATED) {
+	    ERR("Failed to connect stream context object: %s\n", pa_strerror(pa_context_errno(PULSE_context)));
+	    return DSERR_BUFFERLOST;
+	}
+
+	if (sstate == PA_STREAM_READY)
+	    break;
+
+	pa_threaded_mainloop_wait(PULSE_ml);
+    }
+    TRACE("(%p)->stream connected for playback.\n", This);
+    ba_obtained = pa_stream_get_buffer_attr(This->stream);
+
+    TRACE("Obtained buffer tlength:%u (%llums) minreq:%u (%llums)\n",
+        ba_obtained->tlength, pa_bytes_to_usec(ba_obtained->tlength, &This->sample_spec)/1000,
+        ba_obtained->minreq, pa_bytes_to_usec(ba_obtained->minreq, &This->sample_spec)/1000);
+
+    return DS_OK;
+}
+
+static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, REFIID riid, LPVOID *ppobj) {
+    /* IDsDriverBufferImpl *This = (IDsDriverBufferImpl *)iface; */
+    FIXME("(): stub!\n");
+    return DSERR_UNSUPPORTED;
+}
+
+static ULONG WINAPI IDsDriverBufferImpl_AddRef(PIDSDRIVERBUFFER iface) {
+    IDsDriverBufferImpl *This = (IDsDriverBufferImpl *)iface;
+    ULONG refCount = InterlockedIncrement(&This->ref);
+
+    TRACE("(%p)->(ref before=%u)\n",This, refCount - 1);
[...3037 lines suppressed...]
+#include "ksguid.h"
+
+#include <pulse/pulseaudio.h>
+
+/* state diagram for waveOut writing:
+ *
+ * +---------+-------------+---------------+---------------------------------+
+ * |  state  |  function   |     event     |            new state            |
+ * +---------+-------------+---------------+---------------------------------+
+ * |         | open()      |               | STOPPED                         |
+ * | PAUSED  | write()     |               | PAUSED                          |
+ * | STOPPED | write()     | <thrd create> | PLAYING                         |
+ * | PLAYING | write()     | HEADER        | PLAYING                         |
+ * | (other) | write()     | <error>       |                                 |
+ * | (any)   | pause()     | PAUSING       | PAUSED                          |
+ * | PAUSED  | restart()   | RESTARTING    | PLAYING (if no thrd => STOPPED) |
+ * | (any)   | reset()     | RESETTING     | STOPPED                         |
+ * | (any)   | close()     | CLOSING       | CLOSED                          |
+ * +---------+-------------+---------------+---------------------------------+
+ */
+
+/* states of the playing device */
+#define WINE_WS_PLAYING         1
+#define WINE_WS_PAUSED          2
+#define WINE_WS_STOPPED         3
+#define WINE_WS_CLOSED          4
+#define WINE_WS_FAILED          5
+
+#define PULSE_OUT_DEVS	    0x1
+#define PULSE_IN_DEVS	    0x2
+#define PULSE_ALL_DEVS	    PULSE_IN_DEVS | PULSE_OUT_DEVS
+
+#define PULSE_ALL_FORMATS \
+        WAVE_FORMAT_1M08 |	/* Mono	    11025Hz 8-bit  */\
+        WAVE_FORMAT_1M16 |	/* Mono	    11025Hz 16-bit */\
+        WAVE_FORMAT_1S08 |	/* Stereo   11025Hz 8-bit  */\
+        WAVE_FORMAT_1S16 |	/* Stereo   11025Hz 16-bit */\
+        WAVE_FORMAT_2M08 |	/* Mono	    22050Hz 8-bit  */\
+        WAVE_FORMAT_2M16 |	/* Mono	    22050Hz 16-bit */\
+        WAVE_FORMAT_2S08 |	/* Stereo   22050Hz 8-bit  */\
+	WAVE_FORMAT_2S16 |	/* Stereo   22050Hz 16-bit */\
+        WAVE_FORMAT_4M08 |	/* Mono	    44100Hz 8-bit  */\
+	WAVE_FORMAT_4M16 |	/* Mono	    44100Hz 16-bit */\
+        WAVE_FORMAT_4S08 |	/* Stereo   44100Hz 8-bit  */\
+	WAVE_FORMAT_4S16 |	/* Stereo   44100Hz 16-bit */\
+        WAVE_FORMAT_48M08 |	/* Mono	    48000Hz 8-bit  */\
+        WAVE_FORMAT_48S08 |	/* Stereo   48000Hz 8-bit  */\
+        WAVE_FORMAT_48M16 |	/* Mono	    48000Hz 16-bit */\
+        WAVE_FORMAT_48S16 |	/* Stereo   48000Hz 16-bit */\
+	WAVE_FORMAT_96M08 |	/* Mono	    96000Hz 8-bit  */\
+	WAVE_FORMAT_96S08 |	/* Stereo   96000Hz 8-bit  */\
+        WAVE_FORMAT_96M16 |	/* Mono	    96000Hz 16-bit */\
+	WAVE_FORMAT_96S16	/* Stereo   96000Hz 16-bit */
+
+/* events to be sent to device */
+enum win_wm_message {
+    WINE_WM_PAUSING = WM_USER + 1, WINE_WM_RESTARTING, WINE_WM_RESETTING, WINE_WM_HEADER,
+    WINE_WM_BREAKLOOP, WINE_WM_CLOSING, WINE_WM_STARTING, WINE_WM_STOPPING, WINE_WM_XRUN, WINE_WM_FEED
+};
+
+typedef struct {
+    enum win_wm_message 	msg;	/* message identifier */
+    DWORD	                param;  /* parameter for this message */
+    HANDLE	                hEvent;	/* if message is synchronous, handle of event for synchro */
+} PULSE_MSG;
+
+/* implement an in-process message ring for better performance
+ * (compared to passing thru the server)
+ * this ring will be used by the input (resp output) record (resp playback) routine
+ */
+typedef struct {
+    PULSE_MSG			* messages;
+    int                         ring_buffer_size;
+    int				msg_tosave;
+    int				msg_toget;
+/* Either pipe or event is used, but that is defined in pulse.c,
+ * since this is a global header we define both here */
+    int                         msg_pipe[2];
+    HANDLE                      msg_event;
+    CRITICAL_SECTION		msg_crst;
+} PULSE_MSG_RING;
+
+typedef struct WINE_WAVEDEV WINE_WAVEDEV;
+typedef struct WINE_WAVEINST WINE_WAVEINST;
+typedef struct IDsDriverImpl IDsDriverImpl;
+typedef struct IDsDriverBufferImpl IDsDriverBufferImpl;
+
+struct IDsDriverImpl {
+    /* IUnknown fields */
+    const IDsDriverVtbl *lpVtbl;
+    LONG    ref;
+
+    IDsDriverBufferImpl *primary;
+    UINT    wDevID;
+};
+
+struct IDsDriverBufferImpl {
+    const IDsDriverBufferVtbl	*lpVtbl;
+    IDsDriverImpl*		drv;
+    LONG			ref;
+    pa_stream			*stream;
+    pa_sample_spec		sample_spec;
+    pa_cvolume			volume;
+
+    PBYTE		buffer;		    /* Pointer to the latest data fragment for recording streams */
+    size_t		buffer_length;	    /* How large the latest data fragment is */
+    size_t		buffer_read_offset; /* How far into latest data fragment we last read */
+    size_t		fraglen;
+};
+
+/* Per-playback/record device */
+struct WINE_WAVEDEV {
+    char                interface_name[MAXPNAMELEN * 2];
+    char		*device_name;
+    pa_cvolume		volume;
+
+    union {
+        WAVEOUTCAPSW	out;
+	WAVEINCAPSW	in;
+    } caps;
+    
+    /* DirectSound stuff */
+    DSDRIVERDESC                ds_desc;
+    DSDRIVERCAPS                ds_caps;
+};
+
+/* Per-playback/record instance */
+struct WINE_WAVEINST {
+    volatile INT        state;		    /* one of the WINE_WS_ manifest constants */
+    WAVEOPENDESC        waveDesc;
+    WORD		wFlags;
+
+    pa_stream		*stream;	    /* The PulseAudio stream */
+    const pa_timing_info	*timing_info;
+    pa_sample_spec	sample_spec;	    /* Sample spec of this stream / device */
+    pa_cvolume		volume;
+    pa_buffer_attr	buffer_attr;
+
+    /* waveIn / waveOut wavaHdr information */
+    LPWAVEHDR		lpQueuePtr;	    /* start of queued WAVEHDRs (waiting to be notified) */
+    LPWAVEHDR		lpPlayPtr;	    /* start of not yet fully written buffers */
+    DWORD		dwPartialOffset;    /* Offset of not yet written bytes in lpPlayPtr */
+    LPWAVEHDR		lpLoopPtr;          /* pointer of first buffer in loop, if any */
+    DWORD		dwLoops;	    /* private copy of loop counter */
+
+    /* Virtual stream positioning information */
+    DWORD		last_reset;	    /* When the last reset occured, as pa stream time doesn't reset */
+    struct timeval	last_header;	    /* When the last wavehdr was received, only updated when audio is not playing yet */
+    BOOL		is_releasing;	    /* Whether we are releasing wavehdrs */
+    struct timeval	started_releasing;  /* When wavehdr releasing started, for comparison to queued written wavehdrs */
+    DWORD		releasing_offset;   /* How much audio has been released prior when releasing started in this instance */
+
+    /* waveIn */
+    const void		*buffer;	    /* Pointer to the latest data fragment for recording streams */
+    size_t		buffer_length;	    /* How large the latest data fragment is */
+    size_t		buffer_read_offset; /* How far into latest data fragment we last read */
+    size_t		fraglen;    
+
+    /* Thread communication and synchronization stuff */
+    HANDLE		hStartUpEvent;
+    HANDLE		hThread;
+    DWORD		dwThreadID;
+    PULSE_MSG_RING	msgRing;
+};
+
+/* We establish one context per instance, so make it global to the lib */
+pa_context		*PULSE_context;   /* Connection Context */
+pa_threaded_mainloop	*PULSE_ml;        /* PA Runtime information */
+
+/* WaveIn / WaveOut devices */
+WINE_WAVEDEV *WOutDev;
+WINE_WAVEDEV *WInDev;
+DWORD PULSE_WodNumDevs;
+DWORD PULSE_WidNumDevs;
+
+/* pulse.c */
+void	PULSE_WaitForOperation(pa_operation *o);
+void	PULSE_StreamSuccessCallback(pa_stream *s, int success, void *userdata);
+void	PULSE_StreamStateCallback(pa_stream *s, void *userdata);
+void	PULSE_StreamRequestCallback(pa_stream *s, size_t n, void *userdata);
+void	PULSE_StreamUnderflowCallback(pa_stream *s, void *userdata);
+void	PULSE_StreamOverflowCallback(pa_stream *s, void *userdata);
+void	PULSE_StreamSuspendedCallback(pa_stream *s, void *userdata);
+void	PULSE_StreamMovedCallback(pa_stream *s, void *userdata);
+void	PULSE_ContextSuccessCallback(pa_context *c, int success, void *userdata);
+BOOL	PULSE_SetupFormat(LPWAVEFORMATEX wf, pa_sample_spec *ss);
+void	PULSE_GetMMTime(const pa_timing_info *t, pa_sample_spec *s, size_t last_reset, LPMMTIME lpTime);
+int	PULSE_InitRingMessage(PULSE_MSG_RING* omr);
+int	PULSE_DestroyRingMessage(PULSE_MSG_RING* omr);
+void	PULSE_ResetRingMessage(PULSE_MSG_RING* omr);
+void	PULSE_WaitRingMessage(PULSE_MSG_RING* omr, DWORD sleep);
+int	PULSE_AddRingMessage(PULSE_MSG_RING* omr, enum win_wm_message msg, DWORD param, BOOL wait);
+int	PULSE_RetrieveRingMessage(PULSE_MSG_RING* omr, enum win_wm_message *msg, DWORD *param, HANDLE *hEvent);
+const char * PULSE_getCmdString(enum win_wm_message msg);
+BOOL	PULSE_UpdateWavedevs(int devices);
+
+/* dsoutput.c */
+DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
+DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc);
+#endif


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/wine/devel/.cvsignore,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- .cvsignore	8 Feb 2009 07:44:01 -0000	1.70
+++ .cvsignore	24 Feb 2009 20:45:08 -0000	1.71
@@ -1 +1 @@
-wine-1.1.14-fe.tar.bz2
+wine-1.1.15-fe.tar.bz2


Index: README-FEDORA-PULSEAUDIO
===================================================================
RCS file: /cvs/pkgs/rpms/wine/devel/README-FEDORA-PULSEAUDIO,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README-FEDORA-PULSEAUDIO	10 Dec 2008 05:27:04 -0000	1.3
+++ README-FEDORA-PULSEAUDIO	24 Feb 2009 20:45:08 -0000	1.4
@@ -1,10 +1,29 @@
 Wine and Pulseaudio Support
 ---------------------------
 Currently wine does not have native support for pulseaudio. However, some
-patches exist to make wine use a native pulseaudio backend
-(see http://bugs.winehq.org/show_bug.cgi?id=10495). These have been included
-into the fedora wine package. If you have problems please do _not_ report them
-to the wine project.
+patches exist to make wine use a native pulseaudio backend (see [1])
+These have been included into the fedora wine package. If you have problems
+please do _not_ report them to the wine project.
+
+Here are some useful configuration options taken from [1]:
+
+HKCU\Software\Wine\Drivers:Audio
+A string which contains a comma seperated list of audio backends for wine to
+try, in order of preference. For example “pulse,alsa,esd”. Settable through
+winecfg.
+
+HKCU\Software\Wine\Pulse Driver:MonitorDevices
+A string which contains Y or N. If Y, sink monitors will show up as input
+devices. If N, only capture sources will be show up as input devices.
+Default is Y.
+
+HKCU\Software\Wine\DirectSound:HardwareAcceleration
+A string. Also settable in winecfg. When set to “Emulation” WaveOut will be
+used for directsound, which is more likely to work, but will have more latency.
+When set to “Full” the directsound driver is tried for directsound support,
+resulting in less latency, but possibley failure or bad sound.
+
+[1] - http://art.ified.ca/?page_id=40
 
 Other ways to get wine working with pulseaudio are described below:
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/wine/devel/sources,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- sources	8 Feb 2009 07:44:01 -0000	1.71
+++ sources	24 Feb 2009 20:45:08 -0000	1.72
@@ -1 +1 @@
-2ba8d6bcddf2b969da0281f867b713dd  wine-1.1.14-fe.tar.bz2
+cfeb6cfd7404c2fed2c9f2623976ea7e  wine-1.1.15-fe.tar.bz2


Index: wine.spec
===================================================================
RCS file: /cvs/pkgs/rpms/wine/devel/wine.spec,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- wine.spec	8 Feb 2009 07:44:01 -0000	1.97
+++ wine.spec	24 Feb 2009 20:45:09 -0000	1.98
@@ -1,5 +1,5 @@
 Name:		wine
-Version:	1.1.14
+Version:	1.1.15
 Release:	1%{?dist}
 Summary:	A Windows 16/32/64 bit emulator
 
@@ -41,9 +41,10 @@
 
 # explain how to use wine with pulseaudio
 # see http://bugs.winehq.org/show_bug.cgi?id=10495
-Patch400:       wine-pulseaudio.patch
-Patch401:       wine-pulseaudio-waveout.patch
-Patch402:	wine-pulseaudio-winecfg.patch
+# and http://art.ified.ca/?page_id=40
+Patch400:       http://art.ified.ca/downloads/winepulse-0.17-configure.ac.patch
+Patch401:       http://art.ified.ca/downloads/winepulse-0.20.patch
+Patch402:	http://art.ified.ca/downloads/adding-pulseaudio-to-winecfg.patch
 Source402:      README-FEDORA-PULSEAUDIO
 
 
@@ -242,25 +243,19 @@
 %patch400 -p1
 %patch401 -p1
 %patch402 -p1
-autoconf -f
+autoreconf
 
 %build
-# work around gcc bug see #440139
-# this affects more then just dlls/user32/menu.c
-#%if %{?fedora} > 8
-#export CFLAGS="$RPM_OPT_FLAGS -fno-tree-fre -fno-tree-pre"
-#%else
 export CFLAGS="$RPM_OPT_FLAGS"
-#%endif
 
 %configure \
-	--sysconfdir=%{_sysconfdir}/wine --disable-static \
+	--sysconfdir=%{_sysconfdir}/wine \
 	--x-includes=%{_includedir} --x-libraries=%{_libdir} \
 	--with-pulse
 
 %{__make} depend
 
-%{__make} %{?_smp_mflags}
+%{__make} TARGETFLAGS="" %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
@@ -869,11 +864,16 @@
 %{_libdir}/wine/*.def
 
 %files pulseaudio
-# pulseaudio workaround documentation
+# winepulse documentation
 %doc README-FEDORA-PULSEAUDIO
 %{_libdir}/wine/winepulse.drv.so
 
 %changelog
+* Sun Feb 15 2009 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
+- 1.1.15-1
+- version upgrade
+- new pulse patches
+
 * Sat Jan 31 2009 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
 - 1.1.14-1
 - version upgrade


--- wine-alsa-pulseaudio.patch DELETED ---


--- wine-pulseaudio-waveout.patch DELETED ---


--- wine-pulseaudio-winecfg.patch DELETED ---


--- wine-pulseaudio.patch DELETED ---


--- wine-pulseaudio.sh DELETED ---




More information about the fedora-extras-commits mailing list