From d0dcababbffdf1f8b5c0fcdbb0956985e6b57331 Mon Sep 17 00:00:00 2001 From: Andreas Bierfert Date: Tue, 9 Feb 2010 09:18:19 +0000 Subject: [PATCH] - version upgrade - winepulse update (0.35) --- .cvsignore | 2 +- sources | 2 +- wine.spec | 29 +- winepulse-0.32-configure.ac.patch | 58 --- ...-0.6.patch => winepulse-0.34-winecfg.patch | 48 +-- winepulse-0.35-configure.ac.patch | 60 +++ winepulse-0.33.patch => winepulse-0.35.patch | 380 +++++++++--------- 7 files changed, 288 insertions(+), 291 deletions(-) delete mode 100644 winepulse-0.32-configure.ac.patch rename winepulse-winecfg-0.6.patch => winepulse-0.34-winecfg.patch (94%) create mode 100644 winepulse-0.35-configure.ac.patch rename winepulse-0.33.patch => winepulse-0.35.patch (92%) diff --git a/.cvsignore b/.cvsignore index 89e7c16..1f0c866 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -wine-1.1.36-fe.tar.bz2 +wine-1.1.38-fe.tar.bz2 diff --git a/sources b/sources index 9b6d9db..2286e73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -826ca1bc9cfe2b63eee268baeaf36816 wine-1.1.36-fe.tar.bz2 +fdf4b8573b77da73b683e97128ee4150 wine-1.1.38-fe.tar.bz2 diff --git a/wine.spec b/wine.spec index 8c9272e..7bc9204 100644 --- a/wine.spec +++ b/wine.spec @@ -1,23 +1,16 @@ %define no64bit 0 Name: wine -Version: 1.1.36 +Version: 1.1.38 Release: 1%{?dist} Summary: A Windows 16/32/64 bit emulator Group: Applications/Emulators License: LGPLv2+ URL: http://www.winehq.org/ -# special fedora tarball without winemp3 stuff build doing -# rm -fr dlls/winemp3.acm -# and removing the following from the source tree (as of 0.9.35): -# -# configure:ac_config_files="$ac_config_files dlls/winemp3.acm/Makefile" -# configure: "dlls/winemp3.acm/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winemp3.acm/Makefile" ;; -# configure.ac:AC_CONFIG_FILES([dlls/winemp3.acm/Makefile]) -# dlls/Makefile.in: winemp3.acm \ -# Makefile.in: dlls/winemp3.acm/Makefile \ -# Makefile.in:dlls/winemp3.acm/Makefile: dlls/winemp3.acm/Makefile.in dlls/Makedll.rules -# programs/winecfg/libraries.c: "winemp3.acm", +# special fedora tarball without winemp3 +# It can be obtained by running rm -fr dlls/winemp3.acm in the winetree +# and removing the references from configure, configure.ac, Makefile.in, +# and programs/winecfg/libraries.c wrt. winemp3. Source0: %{name}-%{version}-fe.tar.bz2 Source1: wine.init @@ -47,9 +40,9 @@ Source300: wine-mime-msi.desktop # explain how to use wine with pulseaudio # see http://bugs.winehq.org/show_bug.cgi?id=10495 # and http://art.ified.ca/?page_id=40 -Patch400: http://art.ified.ca/downloads/winepulse-0.32-configure.ac.patch -Patch401: http://art.ified.ca/downloads/winepulse-0.33.patch -Patch402: http://art.ified.ca/downloads/winepulse/winepulse-winecfg-0.6.patch +Patch400: http://art.ified.ca/downloads/winepulse-0.35-configure.ac.patch +Patch401: http://art.ified.ca/downloads/winepulse-0.35.patch +Patch402: http://art.ified.ca/downloads/winepulse/winepulse-0.34-winecfg.patch Source402: README-FEDORA-PULSEAUDIO Patch1: wine-rpath.patch @@ -745,6 +738,7 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/msvidc32.dll.so %{_libdir}/wine/mswsock.dll.so %{_libdir}/wine/msxml3.dll.so +%{_libdir}/wine/msxml4.dll.so %{_libdir}/wine/nddeapi.dll.so %{_libdir}/wine/netapi32.dll.so %{_libdir}/wine/newdev.dll.so @@ -1061,6 +1055,11 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/openal32.dll.so %changelog +* Tue Feb 09 2010 Andreas Bierfert +- 1.1.38-1 +- version upgrade +- winepulse upgrade (0.35) + * Mon Jan 18 2010 Andreas Bierfert - 1.1.36-1 - version upgrade (#554102) diff --git a/winepulse-0.32-configure.ac.patch b/winepulse-0.32-configure.ac.patch deleted file mode 100644 index 1db339e..0000000 --- a/winepulse-0.32-configure.ac.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 0cc339b..3f34f12 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -64,6 +64,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]) -@@ -1297,6 +1298,28 @@ 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.14]) -+ if "$PKG_CONFIG" --atleast-version=0.9.14 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") -+ else -+ dnl This warning should be removed if ever commited. -+ dnl Only useful to show that the problem wasn't the patch. -+ WINE_WARNING([libpulse not found or too old. Pulseaudio support will NOT be built.]) -+ 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" -@@ -1449,7 +1472,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 \ -@@ -2509,6 +2532,7 @@ WINE_CONFIG_MAKEFILE([dlls/winenas.drv/Makefile],[dlls/Makedll.rules],[dlls],[AL - 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/wineps16.drv16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16]) -+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/wing.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16]) diff --git a/winepulse-winecfg-0.6.patch b/winepulse-0.34-winecfg.patch similarity index 94% rename from winepulse-winecfg-0.6.patch rename to winepulse-0.34-winecfg.patch index 9cbbf58..5635a97 100644 --- a/winepulse-winecfg-0.6.patch +++ b/winepulse-0.34-winecfg.patch @@ -1,5 +1,5 @@ diff --git a/programs/winecfg/Bg.rc b/programs/winecfg/Bg.rc -index fcdf895..ec24068 100644 +index 5555ad2..29ff717 100644 --- a/programs/winecfg/Bg.rc +++ b/programs/winecfg/Bg.rc @@ -276,6 +276,7 @@ BEGIN @@ -11,7 +11,7 @@ index fcdf895..ec24068 100644 IDS_DRIVER_ESOUND "EsounD Driver" IDS_DRIVER_OSS "OSS Driver" diff --git a/programs/winecfg/Cs.rc b/programs/winecfg/Cs.rc -index d9c0b28..6171f1f 100644 +index f3116d7..2a06d88 100644 --- a/programs/winecfg/Cs.rc +++ b/programs/winecfg/Cs.rc @@ -276,6 +276,7 @@ BEGIN @@ -23,7 +23,7 @@ index d9c0b28..6171f1f 100644 IDS_DRIVER_ESOUND "Ovlada EsounD" IDS_DRIVER_OSS "Ovlada OSS" diff --git a/programs/winecfg/Da.rc b/programs/winecfg/Da.rc -index f53aead..e33bd78 100644 +index 64e022b..e6caea3 100644 --- a/programs/winecfg/Da.rc +++ b/programs/winecfg/Da.rc @@ -270,6 +270,7 @@ BEGIN @@ -35,7 +35,7 @@ index f53aead..e33bd78 100644 IDS_DRIVER_ESOUND "EsounD-driver" IDS_DRIVER_OSS "OSS-driver" diff --git a/programs/winecfg/De.rc b/programs/winecfg/De.rc -index aadd21e..f3016ab 100644 +index fa5bbe5..eda4e2b 100644 --- a/programs/winecfg/De.rc +++ b/programs/winecfg/De.rc @@ -282,6 +282,7 @@ BEGIN @@ -47,7 +47,7 @@ index aadd21e..f3016ab 100644 IDS_DRIVER_ESOUND "EsounD-Treiber" IDS_DRIVER_OSS "OSS-Treiber" diff --git a/programs/winecfg/En.rc b/programs/winecfg/En.rc -index 6aa5120..6f30805 100644 +index 490314a..3e669cd 100644 --- a/programs/winecfg/En.rc +++ b/programs/winecfg/En.rc @@ -282,6 +282,7 @@ BEGIN @@ -59,7 +59,7 @@ index 6aa5120..6f30805 100644 IDS_DRIVER_ESOUND "EsounD Driver" IDS_DRIVER_OSS "OSS Driver" diff --git a/programs/winecfg/Es.rc b/programs/winecfg/Es.rc -index 1771b4e..aaacaa9 100644 +index 423c783..8534cfa 100644 --- a/programs/winecfg/Es.rc +++ b/programs/winecfg/Es.rc @@ -270,6 +270,7 @@ BEGIN @@ -71,7 +71,7 @@ index 1771b4e..aaacaa9 100644 IDS_DRIVER_ESOUND "Manejador EsounD" IDS_DRIVER_OSS "Manejador OSS" diff --git a/programs/winecfg/Fi.rc b/programs/winecfg/Fi.rc -index 0dedf3a..5217482 100644 +index 957b87d..1eb62d1 100644 --- a/programs/winecfg/Fi.rc +++ b/programs/winecfg/Fi.rc @@ -270,6 +270,7 @@ BEGIN @@ -83,7 +83,7 @@ index 0dedf3a..5217482 100644 IDS_DRIVER_ESOUND "EsounD Driver" IDS_DRIVER_OSS "OSS Driver" diff --git a/programs/winecfg/Fr.rc b/programs/winecfg/Fr.rc -index a9184f9..004ebb0 100644 +index f84cff6..045d93f 100644 --- a/programs/winecfg/Fr.rc +++ b/programs/winecfg/Fr.rc @@ -284,6 +284,7 @@ BEGIN @@ -95,7 +95,7 @@ index a9184f9..004ebb0 100644 IDS_DRIVER_ESOUND "Pilote EsounD" IDS_DRIVER_OSS "Pilote OSS" diff --git a/programs/winecfg/Hu.rc b/programs/winecfg/Hu.rc -index dc887fe..9bd192e 100644 +index 7c4e4fc..654b524 100644 --- a/programs/winecfg/Hu.rc +++ b/programs/winecfg/Hu.rc @@ -270,6 +270,7 @@ BEGIN @@ -107,7 +107,7 @@ index dc887fe..9bd192e 100644 IDS_DRIVER_ESOUND "EsounD Driver" IDS_DRIVER_OSS "OSS Driver" diff --git a/programs/winecfg/It.rc b/programs/winecfg/It.rc -index ddeda8c..1530b5f 100644 +index 29deea2..e328a19 100644 --- a/programs/winecfg/It.rc +++ b/programs/winecfg/It.rc @@ -284,6 +284,7 @@ BEGIN @@ -119,7 +119,7 @@ index ddeda8c..1530b5f 100644 IDS_DRIVER_ESOUND "Driver Esound" IDS_DRIVER_OSS "Driver OSS" diff --git a/programs/winecfg/Ja.rc b/programs/winecfg/Ja.rc -index 5b77da7..316d2e5 100644 +index ff03564..94d7c62 100644 --- a/programs/winecfg/Ja.rc +++ b/programs/winecfg/Ja.rc @@ -285,6 +285,7 @@ BEGIN @@ -131,7 +131,7 @@ index 5b77da7..316d2e5 100644 IDS_DRIVER_ESOUND "EsounD ドライバ" IDS_DRIVER_OSS "OSS ドライバ" diff --git a/programs/winecfg/Ko.rc b/programs/winecfg/Ko.rc -index bf06647..66f9803 100644 +index b30ce87..36dabd2 100644 --- a/programs/winecfg/Ko.rc +++ b/programs/winecfg/Ko.rc @@ -285,6 +285,7 @@ BEGIN @@ -143,7 +143,7 @@ index bf06647..66f9803 100644 IDS_DRIVER_ESOUND "EsounD ̹" IDS_DRIVER_OSS "OSS ̹" diff --git a/programs/winecfg/Lt.rc b/programs/winecfg/Lt.rc -index 7208cc6..5aa8fdb 100644 +index 1a9d0fa..ff7a586 100644 --- a/programs/winecfg/Lt.rc +++ b/programs/winecfg/Lt.rc @@ -283,6 +283,7 @@ BEGIN @@ -155,7 +155,7 @@ index 7208cc6..5aa8fdb 100644 IDS_DRIVER_ESOUND "EsounD tvarkyklė" IDS_DRIVER_OSS "OSS tvarkyklė" diff --git a/programs/winecfg/Nl.rc b/programs/winecfg/Nl.rc -index 2fbba6a..802abab 100644 +index 5783033..431872f 100644 --- a/programs/winecfg/Nl.rc +++ b/programs/winecfg/Nl.rc @@ -283,6 +283,7 @@ BEGIN @@ -167,10 +167,10 @@ index 2fbba6a..802abab 100644 IDS_DRIVER_ESOUND "EsounD Stuurprogramma" IDS_DRIVER_OSS "OSS Stuurprogramma" diff --git a/programs/winecfg/No.rc b/programs/winecfg/No.rc -index cc34fad..0f0aea8 100644 +index 13a62f4..7e66a3a 100644 --- a/programs/winecfg/No.rc +++ b/programs/winecfg/No.rc -@@ -270,6 +270,7 @@ BEGIN +@@ -283,6 +283,7 @@ BEGIN IDS_ACCEL_STANDARD "Standard" IDS_ACCEL_BASIC "Grunnleggende" IDS_ACCEL_EMULATION "Emulering" @@ -179,7 +179,7 @@ index cc34fad..0f0aea8 100644 IDS_DRIVER_ESOUND "EsounD-driver" IDS_DRIVER_OSS "OSS-driver" diff --git a/programs/winecfg/Pl.rc b/programs/winecfg/Pl.rc -index d884881..bb97de5 100644 +index 9422f34..eeca25c 100644 --- a/programs/winecfg/Pl.rc +++ b/programs/winecfg/Pl.rc @@ -273,6 +273,7 @@ BEGIN @@ -191,7 +191,7 @@ index d884881..bb97de5 100644 IDS_DRIVER_ESOUND "Sterownik EsounD" IDS_DRIVER_OSS "Sterownik OSS" diff --git a/programs/winecfg/Pt.rc b/programs/winecfg/Pt.rc -index 683dc68..be92466 100644 +index aeab826..c2e0200 100644 --- a/programs/winecfg/Pt.rc +++ b/programs/winecfg/Pt.rc @@ -470,6 +470,7 @@ BEGIN @@ -203,7 +203,7 @@ index 683dc68..be92466 100644 IDS_DRIVER_ESOUND "Controlador EsounD" IDS_DRIVER_OSS "Controlador OSS" diff --git a/programs/winecfg/Ro.rc b/programs/winecfg/Ro.rc -index 5626018..6c84511 100644 +index c031ea8..430d6d8 100644 --- a/programs/winecfg/Ro.rc +++ b/programs/winecfg/Ro.rc @@ -282,6 +282,7 @@ BEGIN @@ -215,7 +215,7 @@ index 5626018..6c84511 100644 IDS_DRIVER_ESOUND "Driver Esound" IDS_DRIVER_OSS "Driver OSS" diff --git a/programs/winecfg/Ru.rc b/programs/winecfg/Ru.rc -index 38b4546..73c0250 100644 +index 58252ba..39fb6d5 100644 --- a/programs/winecfg/Ru.rc +++ b/programs/winecfg/Ru.rc @@ -287,6 +287,7 @@ BEGIN @@ -227,7 +227,7 @@ index 38b4546..73c0250 100644 IDS_DRIVER_ESOUND "EsounD драйвер" IDS_DRIVER_OSS "OSS драйвер" diff --git a/programs/winecfg/Si.rc b/programs/winecfg/Si.rc -index feaef36..1d10bae 100644 +index eec1658..35b5462 100644 --- a/programs/winecfg/Si.rc +++ b/programs/winecfg/Si.rc @@ -272,6 +272,7 @@ BEGIN @@ -239,7 +239,7 @@ index feaef36..1d10bae 100644 IDS_DRIVER_ESOUND "EsounD gonilnik" IDS_DRIVER_OSS "OSS gonilnik" diff --git a/programs/winecfg/Sv.rc b/programs/winecfg/Sv.rc -index 7fea5aa..1979b5a 100644 +index d724afa..ba34d44 100644 --- a/programs/winecfg/Sv.rc +++ b/programs/winecfg/Sv.rc @@ -270,6 +270,7 @@ BEGIN @@ -251,7 +251,7 @@ index 7fea5aa..1979b5a 100644 IDS_DRIVER_ESOUND "EsounD-drivrutin" IDS_DRIVER_OSS "OSS-drivrutin" diff --git a/programs/winecfg/Tr.rc b/programs/winecfg/Tr.rc -index 0fa9778..5ea7da1 100644 +index 89ddb23..196debe 100644 --- a/programs/winecfg/Tr.rc +++ b/programs/winecfg/Tr.rc @@ -270,6 +270,7 @@ BEGIN @@ -263,7 +263,7 @@ index 0fa9778..5ea7da1 100644 IDS_DRIVER_ESOUND "EsounD Srcs" IDS_DRIVER_OSS "OSS Srcs" diff --git a/programs/winecfg/Zh.rc b/programs/winecfg/Zh.rc -index 8c84061..3de1da8 100644 +index 14ac5c3..cd380a3 100644 --- a/programs/winecfg/Zh.rc +++ b/programs/winecfg/Zh.rc @@ -275,6 +275,7 @@ BEGIN diff --git a/winepulse-0.35-configure.ac.patch b/winepulse-0.35-configure.ac.patch new file mode 100644 index 0000000..0d4235b --- /dev/null +++ b/winepulse-0.35-configure.ac.patch @@ -0,0 +1,60 @@ +diff --git a/configure.ac b/configure.ac +index f823045..583f9c1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -64,6 +64,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(v4l, AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)])) + AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]), +@@ -1308,6 +1309,30 @@ then + CFLAGS="$save_CFLAGS" + fi + ++dnl **** Check for PulseAudio **** ++AC_SUBST(PULSELIBS,"") ++AC_SUBST(PULSECFLAGS,"") ++if test "x$with_pulse" != "xno"; ++then ++ ac_save_CPPFLAGS="$CPPFLAGS" ++ if test "$PKG_CONFIG" != "false"; ++ then ++ ac_pulse_libs="`$PKG_CONFIG --libs libpulse 2>/dev/null`" ++ ac_pulse_cflags="`$PKG_CONFIG --cflags libpulse 2>/dev/null`" ++ ++ CPPFLAGS="$CPPFLAGS $ac_pulse_cflags" ++ AC_CHECK_HEADERS(pulse/pulseaudio.h, ++ [AC_CHECK_LIB(pulse, pa_stream_is_corked, ++ [AC_DEFINE(HAVE_PULSEAUDIO, 1, [Define if you have pulseaudio]) ++ PULSELIBS="$ac_pulse_libs" ++ PULSECFLAGS="$ac_pulse_cflags"],,$ac_pulse_libs) ++ ]) ++ fi ++ CPPFLAGS="$ac_save_CPPFLAGS" ++fi ++WINE_WARNING_WITH(pulse, [test "$ac_cv_lib_pulse_pa_stream_is_corked" != "yes"], ++ [libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.]) ++ + 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" +@@ -1460,7 +1485,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 \ +@@ -2555,6 +2580,7 @@ WINE_CONFIG_DLL(winenas.drv) + WINE_CONFIG_DLL(wineoss.drv) + WINE_CONFIG_DLL(wineps.drv) + WINE_CONFIG_DLL(wineps16.drv16,enable_win16) ++WINE_CONFIG_DLL(winepulse.drv) + WINE_CONFIG_DLL(winequartz.drv) + WINE_CONFIG_DLL(winex11.drv) + WINE_CONFIG_DLL(wing.dll16,enable_win16) diff --git a/winepulse-0.33.patch b/winepulse-0.35.patch similarity index 92% rename from winepulse-0.33.patch rename to winepulse-0.35.patch index beee106..9b809f2 100644 --- a/winepulse-0.33.patch +++ b/winepulse-0.35.patch @@ -1,9 +1,9 @@ diff --git a/dlls/winepulse.drv/Makefile.in b/dlls/winepulse.drv/Makefile.in new file mode 100644 -index 0000000..c99c1da +index 0000000..80a751d --- /dev/null +++ b/dlls/winepulse.drv/Makefile.in -@@ -0,0 +1,15 @@ +@@ -0,0 +1,16 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ @@ -11,6 +11,7 @@ index 0000000..c99c1da +MODULE = winepulse.drv +IMPORTS = winmm user32 kernel32 +EXTRALIBS = @PULSELIBS@ ++EXTRACFLAGS = @PULSEINCL@ + +C_SRCS = waveout.c \ + wavein.c \ @@ -21,10 +22,10 @@ index 0000000..c99c1da +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c new file mode 100644 -index 0000000..3dcb086 +index 0000000..9dd1f80 --- /dev/null +++ b/dlls/winepulse.drv/pulse.c -@@ -0,0 +1,788 @@ +@@ -0,0 +1,805 @@ +/* + * Wine Driver for PulseAudio + * http://pulseaudio.org/ @@ -418,6 +419,23 @@ index 0000000..3dcb086 + */ + +/************************************************************************** ++ * PULSE_StreamRequestCallback ++ * ++ * Called by the pulse mainloop whenever it wants/has audio data. ++ */ ++void PULSE_StreamRequestCallback(pa_stream *s, size_t nbytes, void *userdata) { ++ WINE_WAVEINST *ww = (WINE_WAVEINST*)userdata; ++ ++ TRACE("Server has %u bytes\n", nbytes); ++ ++ /* Make sure that the player/recorder is running */ ++ if (ww->hThread != INVALID_HANDLE_VALUE && ww->msgRing.messages) { ++ PULSE_AddRingMessage(&ww->msgRing, WINE_WM_FEED, (DWORD)nbytes, FALSE); ++ } ++} ++ ++ ++/************************************************************************** + * PULSE_StreamSuspendedCallback [internal] + * + * Called by the pulse mainloop any time stream playback is intentionally @@ -476,11 +494,11 @@ index 0000000..3dcb086 + TRACE("Stream %p ready\n", userdata); + break; + -+ case PA_STREAM_TERMINATED: ++ case PA_STREAM_TERMINATED: /* Stream closed normally */ + TRACE("Stream %p terminated\n", userdata); + break; + -+ case PA_STREAM_FAILED: ++ case PA_STREAM_FAILED: /* Stream closed not-normally */ + ERR("Stream %p failed!\n", userdata); + break; + @@ -532,7 +550,7 @@ index 0000000..3dcb086 + break; + + case PA_CONTEXT_FAILED: -+ ERR("Context failure: %s\n", pa_strerror(pa_context_errno(c))); ++ ERR("Context failed: %s\n", pa_strerror(pa_context_errno(c))); + pa_threaded_mainloop_signal(PULSE_ml, 0); + break; + } @@ -559,7 +577,7 @@ index 0000000..3dcb086 + memset(&(wdi->caps.in), 0, sizeof(wdi->caps.in)); + snprintf(wdi->interface_name, MAXPNAMELEN * 2, "winepulse: %s", name); + wdi->device_name = pa_xstrdup(device); -+ MultiByteToWideChar(CP_ACP, 0, description, -1, wdi->caps.in.szPname, sizeof(wdi->caps.in.szPname)/sizeof(WCHAR)); ++ MultiByteToWideChar(CP_UTF8, 0, description, -1, wdi->caps.in.szPname, sizeof(wdi->caps.in.szPname)/sizeof(WCHAR)); + wdi->caps.in.szPname[sizeof(wdi->caps.in.szPname)/sizeof(WCHAR) - 1] = '\0'; + wdi->caps.in.wMid = MM_CREATIVE; + wdi->caps.in.wPid = MM_CREATIVE_SBP16_WAVEOUT; @@ -608,7 +626,7 @@ index 0000000..3dcb086 + wdo->volume.channels = v->channels; + for (x = 0; x < v->channels; x++) wdo->volume.values[x] = v->values[x]; + snprintf(wdo->interface_name, MAXPNAMELEN * 2, "winepulse: %s", name); -+ MultiByteToWideChar(CP_ACP, 0, description, -1, wdo->caps.out.szPname, sizeof(wdo->caps.out.szPname)/sizeof(WCHAR)); ++ MultiByteToWideChar(CP_UTF8, 0, description, -1, wdo->caps.out.szPname, sizeof(wdo->caps.out.szPname)/sizeof(WCHAR)); + wdo->caps.out.szPname[sizeof(wdo->caps.out.szPname)/sizeof(WCHAR) - 1] = '\0'; + wdo->caps.out.wMid = MM_CREATIVE; + wdo->caps.out.wPid = MM_CREATIVE_SBP16_WAVEOUT; @@ -719,7 +737,7 @@ index 0000000..3dcb086 + PULSE_ml = NULL; + + if (!(PULSE_ml = pa_threaded_mainloop_new())) { -+ WARN("Failed to create mainloop object."); ++ ERR("Failed to create mainloop object."); + return DRV_FAILURE; + } + @@ -748,7 +766,6 @@ index 0000000..3dcb086 + pa_threaded_mainloop_lock(PULSE_ml); + + TRACE("libpulse protocol version: %u. API Version %u\n", pa_context_get_protocol_version(PULSE_context), PA_API_VERSION); -+ TRACE("Attempting to connect to pulseaudio server.\n"); + if (pa_context_connect(PULSE_context, NULL, 0, NULL) < 0) + goto fail; + @@ -784,7 +801,8 @@ index 0000000..3dcb086 + +fail: + pa_threaded_mainloop_unlock(PULSE_ml); -+ ERR("Failed to connect to server\n"); ++ /* Only warn, because if we failed wine may still choose the next driver */ ++ WARN("Failed to connect to server\n"); + return DRV_FAILURE; +} + @@ -815,10 +833,10 @@ index 0000000..3dcb086 +} diff --git a/dlls/winepulse.drv/wavein.c b/dlls/winepulse.drv/wavein.c new file mode 100644 -index 0000000..7cbc781 +index 0000000..8aea538 --- /dev/null +++ b/dlls/winepulse.drv/wavein.c -@@ -0,0 +1,595 @@ +@@ -0,0 +1,588 @@ +/* + * Wine Driver for PulseAudio - WaveIn Functionality + * http://pulseaudio.org/ @@ -890,196 +908,188 @@ index 0000000..7cbc781 +} + +/************************************************************************** -+ * widRecorder_NextFragment [internal] -+ * -+ * Gets the next fragment of data from the server. -+ */ -+static size_t widRecorder_NextFragment(WINE_WAVEINST *wwi) { -+ size_t nbytes; -+ -+ TRACE("()\n"); -+ -+ if (wwi->buffer) -+ pa_stream_drop(wwi->stream); -+ -+ pa_stream_peek(wwi->stream, &wwi->buffer, &nbytes); -+ wwi->buffer_length = nbytes; -+ wwi->buffer_read_offset = 0; -+ -+ return nbytes; -+} -+ -+ -+/************************************************************************** + * widRecorder_CopyData [internal] + * + * Copys data from the fragments pulse returns to queued buffers. + */ +static void widRecorder_CopyData(WINE_WAVEINST *wwi) { + LPWAVEHDR lpWaveHdr = wwi->lpQueuePtr; -+ size_t nbytes; -+ -+ while (lpWaveHdr && wwi->state == WINE_WS_PLAYING) { ++ size_t bytes_avail; + -+ nbytes = min(wwi->buffer_length - wwi->buffer_read_offset, lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded); -+ if (nbytes == 0) break; ++ /* Get this value once and trust it. Note that the total available is made ++ * of one _or more_ fragments. These fragments will probably not align with ++ * the wavehdr buffer sizes. */ ++ pa_threaded_mainloop_lock(PULSE_ml); ++ bytes_avail = pa_stream_readable_size(wwi->stream); ++ pa_threaded_mainloop_unlock(PULSE_ml); + -+ TRACE("%u bytes from %p to %p\n", -+ nbytes, -+ (PBYTE)wwi->buffer + wwi->buffer_read_offset, -+ lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded); ++ if (bytes_avail == -1) { ++ ERR("pa_stream_readable_size() returned -1, record stream has failed.\n"); ++ return; ++ } + -+ memcpy(lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded, (PBYTE)wwi->buffer + wwi->buffer_read_offset, nbytes); ++ /* If there is an already peeked buffer, add it to the total */ ++ if (wwi->buffer) ++ bytes_avail += wwi->buffer_length - wwi->buffer_read_offset; + -+ lpWaveHdr->dwBytesRecorded += nbytes; -+ wwi->buffer_read_offset += nbytes; ++ for (;bytes_avail && lpWaveHdr; lpWaveHdr = wwi->lpQueuePtr) { ++ size_t peek_avail; + -+ if (wwi->buffer_read_offset == wwi->buffer_length) { ++ if (!wwi->buffer) { + pa_threaded_mainloop_lock(PULSE_ml); -+ pa_stream_drop(wwi->stream); -+ if (pa_stream_readable_size(wwi->stream)) -+ widRecorder_NextFragment(wwi); -+ else { -+ wwi->buffer = NULL; -+ wwi->buffer_length = 0; -+ wwi->buffer_read_offset = 0; -+ } ++ pa_stream_peek(wwi->stream, &wwi->buffer, &wwi->buffer_length); + pa_threaded_mainloop_unlock(PULSE_ml); ++ wwi->buffer_read_offset = 0; ++ ++ if (!wwi->buffer || !wwi->buffer_length) { ++ WARN("pa_stream_peek failed\n"); ++ break; ++ } + } ++ ++ peek_avail = min(wwi->buffer_length - wwi->buffer_read_offset, ++ lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded); ++ ++ memcpy(lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded, ++ (PBYTE)wwi->buffer + wwi->buffer_read_offset, ++ peek_avail); ++ ++ wwi->buffer_read_offset += peek_avail; ++ lpWaveHdr->dwBytesRecorded += peek_avail; ++ bytes_avail -= peek_avail; + + if (lpWaveHdr->dwBytesRecorded == lpWaveHdr->dwBufferLength) { + lpWaveHdr->dwFlags &= ~WHDR_INQUEUE; + lpWaveHdr->dwFlags |= WHDR_DONE; + wwi->lpQueuePtr = lpWaveHdr->lpNext; + widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0); -+ lpWaveHdr = wwi->lpQueuePtr; + } -+ } ++ ++ if (wwi->buffer_read_offset == wwi->buffer_length) { ++ pa_threaded_mainloop_lock(PULSE_ml); ++ pa_stream_drop(wwi->stream); ++ wwi->buffer = NULL; ++ pa_threaded_mainloop_unlock(PULSE_ml); ++ } ++ } /* for(bytes_avail && lpWaveHdr) */ ++ ++ return; +} + -+/************************************************************************** -+ * widRecorder [internal] -+ */ -+static DWORD CALLBACK widRecorder(LPVOID lpParam) { -+ WINE_WAVEINST *wwi = (WINE_WAVEINST*)lpParam; -+ LPWAVEHDR lpWaveHdr; ++static void widRecorder_ProcessMessages(WINE_WAVEINST* wwi) { ++ LPWAVEHDR lpWaveHdr; + enum win_wm_message msg; + DWORD param; + HANDLE ev; -+ DWORD wait = INFINITE; + -+ wwi->state = WINE_WS_STOPPED; -+ SetEvent(wwi->hStartUpEvent); -+ -+ for (;;) { + -+ if (wwi->state != WINE_WS_PLAYING) { -+ wait = INFINITE; -+ } else { -+ if (wwi->buffer == NULL && pa_stream_readable_size(wwi->stream)) { -+ pa_threaded_mainloop_lock(PULSE_ml); -+ wait = pa_bytes_to_usec(widRecorder_NextFragment(wwi), &wwi->sample_spec)/1000; -+ pa_threaded_mainloop_unlock(PULSE_ml); -+ } -+ } ++ while (PULSE_RetrieveRingMessage(&wwi->msgRing, &msg, ¶m, &ev)) { ++ TRACE("Received %s %x\n", PULSE_getCmdString(msg), param); + -+ widRecorder_CopyData(wwi); ++ switch (msg) { ++ case WINE_WM_FEED: ++ /* Spin the loop in widRecorder */ ++ SetEvent(ev); ++ break; + -+ PULSE_WaitRingMessage(&wwi->msgRing, wait); ++ case WINE_WM_STARTING: ++ wwi->dwLastReset = wwi->timing_info->read_index; ++ pa_threaded_mainloop_lock(PULSE_ml); ++ PULSE_WaitForOperation(pa_stream_cork(wwi->stream, 0, PULSE_StreamSuccessCallback, NULL)); ++ pa_threaded_mainloop_unlock(PULSE_ml); ++ wwi->state = WINE_WS_PLAYING; ++ SetEvent(ev); ++ break; + -+ while (PULSE_RetrieveRingMessage(&wwi->msgRing, &msg, ¶m, &ev)) { -+ TRACE("Received %s %x\n", PULSE_getCmdString(msg), param); ++ case WINE_WM_HEADER: ++ lpWaveHdr = (LPWAVEHDR)param; ++ lpWaveHdr->lpNext = 0; ++ /* insert buffer at the end of queue */ ++ { ++ LPWAVEHDR *wh; ++ for (wh = &(wwi->lpQueuePtr); *wh; wh = &((*wh)->lpNext)); ++ *wh = lpWaveHdr; ++ } ++ break; + -+ switch (msg) { -+ case WINE_WM_FEED: -+ SetEvent(ev); -+ break; -+ case WINE_WM_STARTING: -+ wwi->state = WINE_WS_PLAYING; -+ if (wwi->lpQueuePtr) -+ wait = pa_bytes_to_usec(wwi->lpQueuePtr->dwBufferLength, &wwi->sample_spec)/1000; -+ else -+ wait = INFINITE; -+ wwi->dwLastReset = wwi->timing_info->read_index; -+ pa_threaded_mainloop_lock(PULSE_ml); -+ PULSE_WaitForOperation(pa_stream_cork(wwi->stream, 0, PULSE_StreamSuccessCallback, NULL)); -+ pa_threaded_mainloop_unlock(PULSE_ml); -+ SetEvent(ev); -+ break; -+ case WINE_WM_HEADER: -+ lpWaveHdr = (LPWAVEHDR)param; -+ lpWaveHdr->lpNext = 0; -+ -+ /* insert buffer at the end of queue */ -+ { -+ LPWAVEHDR *wh; -+ for (wh = &(wwi->lpQueuePtr); *wh; wh = &((*wh)->lpNext)); -+ *wh = lpWaveHdr; -+ } -+ break; -+ case WINE_WM_STOPPING: -+ if (wwi->state != WINE_WS_STOPPED) { -+ wwi->state = WINE_WS_STOPPED; -+ pa_threaded_mainloop_lock(PULSE_ml); -+ PULSE_WaitForOperation(pa_stream_cork(wwi->stream, 1, PULSE_StreamSuccessCallback, NULL)); -+ pa_threaded_mainloop_unlock(PULSE_ml); -+ -+ /* return current buffer to app */ -+ lpWaveHdr = wwi->lpQueuePtr; -+ if (lpWaveHdr) { -+ LPWAVEHDR lpNext = lpWaveHdr->lpNext; -+ TRACE("stop %p %p\n", lpWaveHdr, lpWaveHdr->lpNext); -+ lpWaveHdr->dwFlags &= ~WHDR_INQUEUE; -+ lpWaveHdr->dwFlags |= WHDR_DONE; -+ wwi->lpQueuePtr = lpNext; -+ widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0); -+ } -+ } -+ SetEvent(ev); -+ break; -+ case WINE_WM_RESETTING: -+ if (wwi->state != WINE_WS_STOPPED) { ++ case WINE_WM_STOPPING: ++ if (wwi->state != WINE_WS_STOPPED) { + wwi->state = WINE_WS_STOPPED; -+ pa_threaded_mainloop_lock(PULSE_ml); -+ PULSE_WaitForOperation(pa_stream_cork(wwi->stream, 1, PULSE_StreamSuccessCallback, NULL)); -+ pa_threaded_mainloop_unlock(PULSE_ml); ++ pa_threaded_mainloop_lock(PULSE_ml); ++ PULSE_WaitForOperation(pa_stream_cork(wwi->stream, 1, PULSE_StreamSuccessCallback, NULL)); ++ if (wwi->buffer) { ++ pa_stream_drop(wwi->stream); ++ wwi->buffer = NULL; + } ++ pa_threaded_mainloop_unlock(PULSE_ml); + -+ /* return all buffers to the app */ -+ for (lpWaveHdr = wwi->lpPlayPtr ? wwi->lpPlayPtr : wwi->lpQueuePtr; lpWaveHdr; lpWaveHdr = wwi->lpQueuePtr) { ++ /* return only the current buffer to app */ ++ if ((lpWaveHdr = wwi->lpQueuePtr)) { ++ LPWAVEHDR lpNext = lpWaveHdr->lpNext; ++ TRACE("stop %p %p\n", lpWaveHdr, lpWaveHdr->lpNext); + lpWaveHdr->dwFlags &= ~WHDR_INQUEUE; + lpWaveHdr->dwFlags |= WHDR_DONE; -+ wwi->lpQueuePtr = lpWaveHdr->lpNext; ++ wwi->lpQueuePtr = lpNext; + widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0); + } ++ } ++ SetEvent(ev); ++ break; + -+ SetEvent(ev); -+ break; -+ case WINE_WM_CLOSING: -+ wwi->hThread = 0; -+ if ((DWORD)param == 1) { -+ /* If we are here, the stream failed */ -+ wwi->state = WINE_WS_FAILED; -+ SetEvent(ev); -+ PULSE_DestroyRingMessage(&wwi->msgRing); -+ widNotifyClient(wwi, WIM_CLOSE, 0L, 0L); -+ wwi->lpPlayPtr = wwi->lpQueuePtr = NULL; -+ pa_threaded_mainloop_lock(PULSE_ml); -+ pa_stream_disconnect(wwi->stream); -+ pa_threaded_mainloop_unlock(PULSE_ml); -+ TRACE("Thread exiting because of failure.\n"); -+ ExitThread(1); ++ case WINE_WM_RESETTING: ++ if (wwi->state != WINE_WS_STOPPED) { ++ wwi->state = WINE_WS_STOPPED; ++ pa_threaded_mainloop_lock(PULSE_ml); ++ PULSE_WaitForOperation(pa_stream_cork(wwi->stream, 1, PULSE_StreamSuccessCallback, NULL)); ++ if (wwi->buffer) { ++ pa_stream_drop(wwi->stream); ++ wwi->buffer = NULL; + } -+ wwi->state = WINE_WS_CLOSED; -+ SetEvent(ev); -+ ExitThread(0); -+ /* shouldn't go here */ -+ default: -+ FIXME("unknown message %d\n", msg); -+ break; -+ } /* switch(msg) */ -+ } /* while(PULSE_RetrieveRingMessage()) */ -+ } /* for (;;) */ ++ pa_threaded_mainloop_unlock(PULSE_ml); ++ } ++ ++ /* return all the buffers to the app */ ++ lpWaveHdr = wwi->lpPlayPtr ? wwi->lpPlayPtr : wwi->lpQueuePtr; ++ for (; lpWaveHdr; lpWaveHdr = wwi->lpQueuePtr) { ++ lpWaveHdr->dwFlags &= ~WHDR_INQUEUE; ++ lpWaveHdr->dwFlags |= WHDR_DONE; ++ wwi->lpQueuePtr = lpWaveHdr->lpNext; ++ widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0); ++ } ++ SetEvent(ev); ++ break; ++ ++ case WINE_WM_CLOSING: ++ wwi->hThread = 0; ++ wwi->state = WINE_WS_CLOSED; ++ SetEvent(ev); ++ ExitThread(0); ++ /* shouldn't go here */ ++ ++ default: ++ FIXME("unknown message %d\n", msg); ++ break; ++ } ++ } ++} ++ ++/************************************************************************** ++ * widRecorder [internal] ++ */ ++static DWORD CALLBACK widRecorder(LPVOID lpParam) { ++ WINE_WAVEINST *wwi = (WINE_WAVEINST*)lpParam; ++ ++ wwi->state = WINE_WS_STOPPED; ++ SetEvent(wwi->hStartUpEvent); ++ ++ for (;;) { ++ PULSE_WaitRingMessage(&wwi->msgRing, INFINITE); ++ widRecorder_ProcessMessages(wwi); ++ if (wwi->state == WINE_WS_PLAYING && wwi->lpQueuePtr) ++ widRecorder_CopyData(wwi); ++ } ++ ++ return 0; +} + +/************************************************************************** @@ -1139,7 +1149,8 @@ index 0000000..7cbc781 + goto exit; + } + -+ pa_stream_set_state_callback(wwi->stream, PULSE_StreamStateCallback, wwi); ++ pa_stream_set_state_callback(wwi->stream, PULSE_StreamStateCallback, wwi); ++ pa_stream_set_read_callback (wwi->stream, PULSE_StreamRequestCallback, wwi); + + wwi->buffer_attr.maxlength = (uint32_t)-1; + wwi->buffer_attr.fragsize = pa_bytes_per_second(&wwi->sample_spec) / 100; @@ -1327,7 +1338,7 @@ index 0000000..7cbc781 + * Context-sanity check here, as if we respond with 0, WINE will move on + * to the next wavein driver. + */ -+static DWORD widGetNumDevs() { ++static DWORD widGetNumDevs(void) { + if (pa_context_get_state(PULSE_context) != PA_CONTEXT_READY) + return 0; + @@ -1340,7 +1351,7 @@ index 0000000..7cbc781 +static DWORD widDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) { + TRACE("(%u, %p)\n", wDevID, dwParam1); + -+ *dwParam1 = MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1, ++ *dwParam1 = MultiByteToWideChar(CP_UTF8, 0, WInDev[wDevID].interface_name, -1, + NULL, 0 ) * sizeof(WCHAR); + return MMSYSERR_NOERROR; +} @@ -1349,10 +1360,10 @@ index 0000000..7cbc781 + * widDevInterface [internal] + */ +static DWORD widDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2) { -+ if (dwParam2 >= MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1, ++ if (dwParam2 >= MultiByteToWideChar(CP_UTF8, 0, WInDev[wDevID].interface_name, -1, + NULL, 0 ) * sizeof(WCHAR)) + { -+ MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1, ++ MultiByteToWideChar(CP_UTF8, 0, WInDev[wDevID].interface_name, -1, + dwParam1, dwParam2 / sizeof(WCHAR)); + return MMSYSERR_NOERROR; + } @@ -1416,10 +1427,10 @@ index 0000000..7cbc781 +#endif /* HAVE_PULSEAUDIO */ diff --git a/dlls/winepulse.drv/waveout.c b/dlls/winepulse.drv/waveout.c new file mode 100644 -index 0000000..e7454fd +index 0000000..989dff5 --- /dev/null +++ b/dlls/winepulse.drv/waveout.c -@@ -0,0 +1,1040 @@ +@@ -0,0 +1,1024 @@ +/* + * Wine Driver for PulseAudio - WaveOut Functionality + * http://pulseaudio.org/ @@ -1490,22 +1501,6 @@ index 0000000..e7454fd + *======================================================================*/ + +/************************************************************************** -+ * WAVEOUT_StreamRequestCallback -+ * -+ * Called by the pulse mainloop whenever it wants audio data. -+ */ -+static void WAVEOUT_StreamRequestCallback(pa_stream *s, size_t nbytes, void *userdata) { -+ WINE_WAVEINST *ww = (WINE_WAVEINST*)userdata; -+ -+ TRACE("Asking to be fed %u bytes\n", nbytes); -+ -+ /* Make sure that the player/recorder is running */ -+ if (ww->hThread != INVALID_HANDLE_VALUE && ww->msgRing.messages) { -+ PULSE_AddRingMessage(&ww->msgRing, WINE_WM_FEED, (DWORD)nbytes, FALSE); -+ } -+} -+ -+/************************************************************************** + * WAVEOUT_SinkInputInfoCallback [internal] + * + * Called by the pulse thread. Used for wodGetVolume. @@ -2033,7 +2028,7 @@ index 0000000..e7454fd + } + + /* Setup callbacks */ -+ pa_stream_set_write_callback (wwo->stream, WAVEOUT_StreamRequestCallback, wwo); ++ pa_stream_set_write_callback (wwo->stream, PULSE_StreamRequestCallback, wwo); + pa_stream_set_state_callback (wwo->stream, PULSE_StreamStateCallback, wwo); + pa_stream_set_underflow_callback (wwo->stream, PULSE_StreamUnderflowCallback, wwo); + pa_stream_set_moved_callback (wwo->stream, PULSE_StreamMovedCallback, wwo); @@ -2373,7 +2368,7 @@ index 0000000..e7454fd + */ +static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) { + -+ *dwParam1 = MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].interface_name, -1, NULL, 0) * sizeof(WCHAR); ++ *dwParam1 = MultiByteToWideChar(CP_UTF8, 0, WOutDev[wDevID].interface_name, -1, NULL, 0) * sizeof(WCHAR); + return MMSYSERR_NOERROR; +} + @@ -2381,10 +2376,10 @@ index 0000000..e7454fd + * wodDevInterface [internal] + */ +static DWORD wodDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2) { -+ if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].interface_name, -1, ++ if (dwParam2 >= MultiByteToWideChar(CP_UTF8, 0, WOutDev[wDevID].interface_name, -1, + NULL, 0 ) * sizeof(WCHAR)) + { -+ MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].interface_name, -1, ++ MultiByteToWideChar(CP_UTF8, 0, WOutDev[wDevID].interface_name, -1, + dwParam1, dwParam2 / sizeof(WCHAR)); + return MMSYSERR_NOERROR; + } @@ -2471,10 +2466,10 @@ index 0000000..1b49460 +@ stdcall -private widMessage(long long long long long long) PULSE_widMessage diff --git a/dlls/winepulse.drv/winepulse.h b/dlls/winepulse.drv/winepulse.h new file mode 100644 -index 0000000..0aa7e86 +index 0000000..b83de5d --- /dev/null +++ b/dlls/winepulse.drv/winepulse.h -@@ -0,0 +1,196 @@ +@@ -0,0 +1,197 @@ +/* Definitions for PulseAudio Wine Driver + * + * Copyright 2009 Arthur Taylor @@ -2648,6 +2643,7 @@ index 0000000..0aa7e86 +DWORD PULSE_WidNumDevs; + +/* pulse.c: PulseAudio Async Callbacks */ ++void PULSE_StreamRequestCallback(pa_stream *s, size_t nbytes, void *userdata); +void PULSE_StreamSuccessCallback(pa_stream *s, int success, void *userdata); +void PULSE_StreamStateCallback(pa_stream *s, void *userdata); +void PULSE_StreamUnderflowCallback(pa_stream *s, void *userdata);