diff --git a/.cvsignore b/.cvsignore index e176e7c..e69de29 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +0,0 @@ -wine-1.1.29-fe.tar.bz2 diff --git a/sources b/sources index 41c29d8..e69de29 100644 --- a/sources +++ b/sources @@ -1 +0,0 @@ -3782b65da7db94460b93961356715403 wine-1.1.29-fe.tar.bz2 diff --git a/steam-regression.patch b/steam-regression.patch deleted file mode 100644 index 2b53d7e..0000000 --- a/steam-regression.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/dlls/winex11.drv/bitmap.c -+++ b/dlls/winex11.drv/bitmap.c -@@ -110,10 +110,6 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) - if (physDev->depth != physBitmap->pixmap_depth) - { - physDev->depth = physBitmap->pixmap_depth; -- if(physDev->depth == 1) -- physDev->color_shifts = NULL; -- else -- physDev->color_shifts = &physBitmap->pixmap_color_shifts; - wine_tsx11_lock(); - XFreeGC( gdi_display, physDev->gc ); - physDev->gc = XCreateGC( gdi_display, physDev->drawable, 0, NULL ); -@@ -122,6 +118,12 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) - XFlush( gdi_display ); - wine_tsx11_unlock(); - } -+ -+ if(physDev->depth == 1) -+ physDev->color_shifts = NULL; -+ else -+ physDev->color_shifts = &physBitmap->pixmap_color_shifts; -+ - return hbitmap; - } diff --git a/wine-rpath.patch b/wine-rpath.patch index 06e1045..f8f6585 100644 --- a/wine-rpath.patch +++ b/wine-rpath.patch @@ -1,6 +1,6 @@ ---- configure.orig 2009-08-26 11:47:17.000000000 +0200 -+++ configure 2009-08-26 11:50:07.000000000 +0200 -@@ -6565,14 +6565,14 @@ +--- configure.orig 2009-10-29 18:57:06.000000000 +0100 ++++ configure 2009-10-29 18:58:49.000000000 +0100 +@@ -6758,14 +6758,14 @@ fi @@ -18,15 +18,28 @@ +CFLAGS="$CFLAGS -fPIC" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -@@ -6597,8 +6597,8 @@ + int main(int argc, char *argv) { return 0; } +@@ -6783,17 +6783,17 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_ac_var'};$as_echo "$as_val"'` = yes; then : - LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`" - LDRPATH_LOCAL="-Wl,--rpath,\\\$\$ORIGIN/\$(TOPOBJDIR)/libs/wine" + LDRPATH_INSTALL="" -+ LDRPATH_LOCAL="" ++ LDRPATH_LOCAL="" + else +- as_ac_var=`$as_echo "ac_cv_cflags_-fPIC -Wl,-R,\\$ORIGIN/../lib" | $as_tr_sh` +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -Wl,-R,\$ORIGIN/../lib" >&5 +-$as_echo_n "checking whether the compiler supports -fPIC -Wl,-R,\$ORIGIN/../lib... " >&6; } ++ as_ac_var=`$as_echo "ac_cv_cflags_-fPIC" | $as_tr_sh` ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC" >&5 ++$as_echo_n "checking whether the compiler supports -fPIC " >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else - as_ac_var=`$as_echo "ac_cv_cflags_-fPIC -Wl,-R,\\$ORIGIN/../lib" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -Wl,-R,\$ORIGIN/../lib" >&5 + ac_wine_try_cflags_saved=$CFLAGS +-CFLAGS="$CFLAGS -fPIC -Wl,-R,\$ORIGIN/../lib" ++CFLAGS="$CFLAGS -fPIC" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + int main(int argc, char *argv) { return 0; } diff --git a/wine.spec b/wine.spec index b3a54f2..8b61415 100644 --- a/wine.spec +++ b/wine.spec @@ -1,7 +1,7 @@ %define no64bit 0 Name: wine -Version: 1.1.29 -Release: 3%{?dist} +Version: 1.1.32 +Release: 1%{?dist} Summary: A Windows 16/32/64 bit emulator Group: Applications/Emulators @@ -47,17 +47,15 @@ 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.30-configure.ac.patch -Patch401: http://art.ified.ca/downloads/winepulse-0.30.patch -Patch402: http://art.ified.ca/downloads/winepulse/winepulse-winecfg-0.6.patch +Patch400: http://art.ified.ca/downloads/winepulse-0.32-configure.ac.patch +Patch401: http://art.ified.ca/downloads/winepulse-0.32.patch +Patch402: http://art.ified.ca/downloads/winepulse/winepulse-winecfg-0.6.patch Source402: README-FEDORA-PULSEAUDIO Patch1: wine-rpath.patch # bugfix patches -# fix steam regression http://bugs.winehq.org/show_bug.cgi?id=19916 -# upstream commit 70241904b9efacab9fb6c7d8701b1cfdb86f49f7 -Patch1000: steam-regression.patch +# none Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -112,6 +110,7 @@ BuildRequires: dbus-devel hal-devel BuildRequires: gnutls-devel BuildRequires: pulseaudio-libs-devel BuildRequires: gsm-devel +BuildRequires: openal-soft-devel # noarch Requires: wine-common = %{version}-%{release} @@ -299,6 +298,15 @@ Requires: wine-core = %{version}-%{release} %description oss This package adds an oss driver for wine. +%package openal +Summary: Openal support for wine +Group: System Environment/Libraries +Requires: wine-core = %{version}-%{release} + +%description openal +This package adds an openal driver for wine. + + %prep %setup -q -n %{name}-%{version}-fe @@ -307,8 +315,6 @@ This package adds an oss driver for wine. %patch401 -p1 %patch402 -p1 -%patch1000 -p1 - autoreconf %build @@ -498,6 +504,9 @@ update-desktop-database &>/dev/null || : %post oss -p /sbin/ldconfig %postun oss -p /sbin/ldconfig +%post openal -p /sbin/ldconfig +%postun openal -p /sbin/ldconfig + %files %defattr(-,root,root,-) # meta package @@ -550,6 +559,7 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/fakedlls/* %{_libdir}/wine/cacls.exe.so %{_libdir}/wine/expand.exe.so +%{_libdir}/wine/extrac32.exe.so %{_libdir}/wine/winhlp32.exe.so %{_libdir}/wine/msiexec.exe.so %{_libdir}/wine/net.exe.so @@ -642,6 +652,7 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/dxgi.dll.so %{_libdir}/wine/eject.exe.so %{_libdir}/wine/faultrep.dll.so +%{_libdir}/wine/fltlib.dll.so %{_libdir}/wine/fusion.dll.so %{_libdir}/wine/gdi32.dll.so %{_libdir}/wine/gdiplus.dll.so @@ -817,7 +828,6 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/wintab32.dll.so %{_libdir}/wine/wintrust.dll.so %{_libdir}/wine/wnaspi32.dll.so -%{_libdir}/wine/wow32.dll.so %{_libdir}/wine/ws2_32.dll.so %{_libdir}/wine/wsock32.dll.so %{_libdir}/wine/wtsapi32.dll.so @@ -843,13 +853,10 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/winevdm.exe.so %{_libdir}/wine/ifsmgr.vxd.so %{_libdir}/wine/mmdevldr.vxd.so -%{_libdir}/wine/mmsystem.dll16 %{_libdir}/wine/monodebg.vxd.so %{_libdir}/wine/vdhcp.vxd.so -%{_libdir}/wine/ver.dll16 %{_libdir}/wine/user.exe16 %{_libdir}/wine/vmm.vxd.so -%{_libdir}/wine/wing.dll16 %{_libdir}/wine/vnbt.vxd.so %{_libdir}/wine/vnetbios.vxd.so %{_libdir}/wine/vtdapi.vxd.so @@ -857,12 +864,7 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/w32skrnl.dll.so %{_libdir}/wine/commdlg.dll16 %{_libdir}/wine/gdi.exe16 -%{_libdir}/wine/setupx.dll16 -%{_libdir}/wine/system.drv16 -%{_libdir}/wine/toolhelp.dll16 -%{_libdir}/wine/winsock.dll16 %{_libdir}/wine/wprocs.dll16 -%{_libdir}/wine/wineps16.drv16 %{_libdir}/wine/avifile.dll16.so %{_libdir}/wine/comm.drv16.so @@ -876,6 +878,7 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/krnl386.exe16 %{_libdir}/wine/keyboard.drv16.so %{_libdir}/wine/lzexpand.dll16.so +%{_libdir}/wine/mmsystem.dll16.so %{_libdir}/wine/mouse.drv16.so %{_libdir}/wine/msacm.dll16.so %{_libdir}/wine/msvideo.dll16.so @@ -888,21 +891,29 @@ update-desktop-database &>/dev/null || : %{_libdir}/wine/olecli.dll16.so %{_libdir}/wine/olesvr.dll16.so %{_libdir}/wine/rasapi16.dll16.so +%{_libdir}/wine/setupx.dll16.so %{_libdir}/wine/shell.dll16.so %{_libdir}/wine/sound.drv16.so %{_libdir}/wine/storage.dll16.so %{_libdir}/wine/stress.dll16.so +%{_libdir}/wine/system.drv16.so +%{_libdir}/wine/toolhelp.dll16.so %{_libdir}/wine/twain.dll16.so %{_libdir}/wine/typelib.dll16.so +%{_libdir}/wine/ver.dll16.so %{_libdir}/wine/w32sys.dll16.so %{_libdir}/wine/win32s16.dll16.so %{_libdir}/wine/win87em.dll16.so %{_libdir}/wine/winaspi.dll16.so %{_libdir}/wine/windebug.dll16.so +%{_libdir}/wine/wineps16.drv16.so +%{_libdir}/wine/wing.dll16.so %{_libdir}/wine/winhelp.exe16.so %{_libdir}/wine/winnls.dll16.so %{_libdir}/wine/winoldap.mod16.so +%{_libdir}/wine/winsock.dll16.so %{_libdir}/wine/wintab.dll16.so +%{_libdir}/wine/wow32.dll.so %endif %files common @@ -1030,7 +1041,22 @@ update-desktop-database &>/dev/null || : %defattr(-,root,root,-) %{_libdir}/wine/wineoss.drv.so +%files openal +%defattr(-,root,root,-) +%{_libdir}/wine/openal32.dll.so + %changelog +* Tue Oct 27 2009 Andreas Bierfert +- 1.1.32-1 +- version upgrade (#531358) +- update winepulse + +* Mon Sep 28 2009 Andreas Bierfert +- 1.1.30-1 +- version upgrade +- openal support +- drop steam regression patch + * Sun Sep 13 2009 Andreas Bierfert - 1.1.29-3 - patch for steam regression (upstream #19916) diff --git a/winepulse-0.30-configure.ac.patch b/winepulse-0.32-configure.ac.patch similarity index 78% rename from winepulse-0.30-configure.ac.patch rename to winepulse-0.32-configure.ac.patch index e4d800c..1db339e 100644 --- a/winepulse-0.30-configure.ac.patch +++ b/winepulse-0.32-configure.ac.patch @@ -1,8 +1,8 @@ diff --git a/configure.ac b/configure.ac -index 59b771c..385a7e4 100644 +index 0cc339b..3f34f12 100644 --- a/configure.ac +++ b/configure.ac -@@ -60,6 +60,7 @@ AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]), +@@ -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]) @@ -10,7 +10,7 @@ index 59b771c..385a7e4 100644 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]) -@@ -1257,6 +1258,24 @@ then +@@ -1297,6 +1298,28 @@ then CFLAGS="$save_CFLAGS" fi @@ -28,6 +28,10 @@ index 59b771c..385a7e4 100644 + 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 @@ -35,7 +39,7 @@ index 59b771c..385a7e4 100644 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" -@@ -1391,7 +1410,7 @@ dnl **** Check for libodbc **** +@@ -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 **** @@ -44,11 +48,11 @@ index 59b771c..385a7e4 100644 "$ac_cv_header_sys_soundcard_h" != "yes" -a \ "$ac_cv_header_machine_soundcard_h" != "yes" -a \ "$ac_cv_header_soundcard_h" != "yes" -a \ -@@ -2429,6 +2448,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]) +@@ -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/wing32/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-0.30.patch b/winepulse-0.32.patch similarity index 97% rename from winepulse-0.30.patch rename to winepulse-0.32.patch index 0d8970b..b3d4172 100644 --- a/winepulse-0.30.patch +++ b/winepulse-0.32.patch @@ -1416,10 +1416,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..458a33d +index 0000000..334cc72 --- /dev/null +++ b/dlls/winepulse.drv/waveout.c -@@ -0,0 +1,1070 @@ +@@ -0,0 +1,1049 @@ +/* + * Wine Driver for PulseAudio - WaveOut Functionality + * http://pulseaudio.org/ @@ -1615,6 +1615,7 @@ index 0000000..458a33d + * the size of the buffer on the pulse server side. + */ +static void wodPlayer_CheckReleasing(WINE_WAVEINST *wwo) { ++ LPWAVEHDR lpWaveHdr; + + if (wwo->buffer_attr.tlength == -1 && wwo->lpQueuePtr && !wwo->lpPlayPtr && wwo->state != WINE_WS_STOPPED) { + const pa_buffer_attr *returned; @@ -1624,12 +1625,11 @@ index 0000000..458a33d + * streams for server version 0.9.11 to 0.9.14 */ + + pa_threaded_mainloop_lock(PULSE_ml); -+ -+ /* Calculate desired buffer length. write_index is the amount of data -+ * written. If there is more than one buffer queued, subtract the -+ * length of one to allow there to be a free buffer for the app. */ -+ wwo->buffer_attr.tlength = wwo->timing_info->write_index; -+ if (wwo->lpQueuePtr->lpNext) wwo->buffer_attr.tlength -= wwo->lpQueuePtr->dwBufferLength; ++ ++ /* Calculate how large a buffer the application has made so far */ ++ wwo->buffer_attr.tlength = 0; ++ for (lpWaveHdr = wwo->lpQueuePtr; lpWaveHdr; lpWaveHdr = lpWaveHdr->lpNext) ++ wwo->buffer_attr.tlength += lpWaveHdr->dwBufferLength; + + WARN("Asking for new buffer target length of %llums (%u bytes)\n", + pa_bytes_to_usec(wwo->buffer_attr.tlength, &wwo->sample_spec) / 1000, @@ -1672,7 +1672,7 @@ index 0000000..458a33d + /* See if this data has been played, and if not, return when it will have been */ + wait = pa_bytes_to_usec(lpWaveHdr->reserved + lpWaveHdr->dwBufferLength, &wwo->sample_spec); + if (wait >= time) { -+ wait = ((wait - time) + 999) / 1000; ++ wait = ((wait - time) + (pa_usec_t)999) / (pa_usec_t)1000; + return wait ?: 1; + } + } @@ -1809,7 +1809,7 @@ index 0000000..458a33d + * not reset to 0 on Reset() calls. Better than pa_stream_get_time() as it is + * more constant. + */ -+static pa_usec_t WAVEOUT_GetStreamTime(WINE_WAVEINST *wwo) { ++static pa_usec_t wodPlayer_GetStreamTime(WINE_WAVEINST *wwo) { + pa_usec_t time, temp; + const pa_timing_info *t; + @@ -1909,38 +1909,22 @@ index 0000000..458a33d + break; + + case WINE_WM_FEED: /* Sent by the pulse thread */ ++ msgcount--; /* Don't count this message for stall detection */ + wodPlayer_Feed(wwo, pa_stream_writable_size(wwo->stream)); + SetEvent(ev); + break; + + case WINE_WM_XRUN: /* Sent by the pulse thread */ ++ msgcount--; /* Don't count this message for stall detection */ + WARN("Trying to recover from underrun.\n"); + /* Return all the queued wavehdrs, so the app will send more data */ + wodPlayer_NotifyCompletions(wwo, FALSE, (pa_usec_t)-1); + -+ /* Underrun means playback started, so don't allow future setting of the buffer attributes */ -+ if (wwo->buffer_attr.tlength == (uint32_t)-1) wwo->buffer_attr.tlength = 0; -+ + SetEvent(ev); + break; + -+ case WINE_WM_CLOSING: /* If param = 1, close because of a failure */ ++ case WINE_WM_CLOSING: + wwo->hThread = NULL; -+ if ((DWORD)param == 1) { -+ /* If we are here, the stream has failed */ -+ wwo->state = WINE_WS_FAILED; -+ SetEvent(ev); -+ PULSE_DestroyRingMessage(&wwo->msgRing); -+ wodPlayer_NotifyCompletions(wwo, TRUE, 0); -+ wodPlayer_NotifyClient(wwo, WOM_CLOSE, 0L, 0L); -+ wwo->lpPlayPtr = wwo->lpQueuePtr = wwo->lpLoopPtr = NULL; -+ pa_threaded_mainloop_lock(PULSE_ml); -+ pa_stream_disconnect(wwo->stream); -+ pa_threaded_mainloop_unlock(PULSE_ml); -+ TRACE("Thread exiting because of failure.\n"); -+ ExitThread(1); -+ /* Stream instance will get dereferenced in wod_Close */ -+ } + wwo->state = WINE_WS_CLOSED; + /* sanity check: this should not happen since the device must have been reset before */ + if (wwo->lpQueuePtr || wwo->lpPlayPtr) ERR("out of sync\n"); @@ -1984,10 +1968,12 @@ index 0000000..458a33d + + /* If there is audio playing, return headers and get next timeout */ + if (wwo->state == WINE_WS_PLAYING) { -+ dwSleepTime = wodPlayer_NotifyCompletions(wwo, FALSE, WAVEOUT_GetStreamTime(wwo)); ++ dwSleepTime = wodPlayer_NotifyCompletions(wwo, FALSE, wodPlayer_GetStreamTime(wwo)); + } else + dwSleepTime = INFINITE; + } ++ ++ return 0; +} + +/************************************************************************** @@ -2062,7 +2048,7 @@ index 0000000..458a33d + pa_stream_set_moved_callback (wwo->stream, PULSE_StreamMovedCallback, wwo); + pa_stream_set_suspended_callback (wwo->stream, PULSE_StreamSuspendedCallback, wwo); + -+ /* Blank (but don't send) Buffer Attributes */ ++ /* Blank Buffer Attributes */ + wwo->buffer_attr.prebuf = (uint32_t)-1; + wwo->buffer_attr.tlength = (uint32_t)-1; + wwo->buffer_attr.minreq = (uint32_t)-1; @@ -2224,7 +2210,7 @@ index 0000000..458a33d + + if (lpTime == NULL) return MMSYSERR_INVALPARAM; + -+ time = WAVEOUT_GetStreamTime(wwo); ++ time = wodPlayer_GetStreamTime(wwo); + + temp = pa_bytes_to_usec(wwo->dwLastReset, &wwo->sample_spec); + if (time > temp) time -= temp; else time = 0; @@ -2277,7 +2263,7 @@ index 0000000..458a33d + * wodGetVolume [internal] + */ +static DWORD wodGetVolume(WINE_WAVEINST *wwo, LPDWORD lpdwVol) { -+ float value1, value2; ++ double value1, value2; + DWORD wleft, wright; + + if (!wwo || wwo->state == WINE_WS_FAILED) { @@ -2299,21 +2285,15 @@ index 0000000..458a33d + + + if (wwo->volume.channels == 2) { -+ value1 = pa_sw_volume_to_dB(wwo->volume.values[0]); -+ value2 = pa_sw_volume_to_dB(wwo->volume.values[1]); ++ value1 = pa_sw_volume_to_linear(wwo->volume.values[0]); ++ value2 = pa_sw_volume_to_linear(wwo->volume.values[1]); + } else { -+ value1 = pa_sw_volume_to_dB(pa_cvolume_avg(&wwo->volume)); ++ value1 = pa_sw_volume_to_linear(pa_cvolume_avg(&wwo->volume)); + value2 = value1; + } + -+ if (value1 < -60) -+ wleft = 0; -+ else -+ -+ if (value2 < -60) -+ wright = 0; -+ else -+ wright = 0xFFFFl - ((value2 / -60)*(float)0xFFFFl); ++ wleft = 0xFFFFl * value1; ++ wright = 0xFFFFl * value2; + + if (wleft > 0xFFFFl) + wleft = 0xFFFFl; @@ -2337,18 +2317,17 @@ index 0000000..458a33d + return MMSYSERR_INVALHANDLE; + } + -+ /* waveOut volumes are /supposed/ to be logarithmic */ -+ value1 = LOWORD(dwParam1) == 0 ? PA_DECIBEL_MININFTY : ((float)(0xFFFFl - LOWORD(dwParam1))/0xFFFFl) * -60.0; -+ value2 = HIWORD(dwParam1) == 0 ? PA_DECIBEL_MININFTY : ((float)(0xFFFFl - HIWORD(dwParam1))/0xFFFFl) * -60.0; ++ value1 = (double)LOWORD(dwParam1)/(double)0xFFFFl; ++ value2 = (double)HIWORD(dwParam1)/(double)0xFFFFl; + + if (wwo->sample_spec.channels == 2) { + wwo->volume.channels = 2; -+ wwo->volume.values[0] = pa_sw_volume_from_dB(value1); -+ wwo->volume.values[1] = pa_sw_volume_from_dB(value2); ++ wwo->volume.values[0] = pa_sw_volume_from_linear(value1); ++ wwo->volume.values[1] = pa_sw_volume_from_linear(value2); + } else { + if (value1 != value2) FIXME("Non-stereo streams can't pan!\n"); + wwo->volume.channels = wwo->sample_spec.channels; -+ pa_cvolume_set(&wwo->volume, wwo->volume.channels, pa_sw_volume_from_dB(max(value1, value2))); ++ pa_cvolume_set(&wwo->volume, wwo->volume.channels, pa_sw_volume_from_linear(value1 > value2 ? value1 : value2)); + } + + if (TRACE_ON(wave)) { @@ -2501,7 +2480,7 @@ 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..4a834cd +index 0000000..0aa7e86 --- /dev/null +++ b/dlls/winepulse.drv/winepulse.h @@ -0,0 +1,196 @@ @@ -2636,7 +2615,7 @@ index 0000000..4a834cd + +/* Per-playback/record instance */ +struct WINE_WAVEINST { -+ volatile INT state; /* one of the WINE_WS_ manifest constants */ ++ INT state; /* one of the WINE_WS_ manifest constants */ + WAVEOPENDESC waveDesc; + WORD wFlags; +