winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2015
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
503 discussions
Start a n
N
ew thread
Andrew Eikum : xaudio2/tests: Add callback tests.
by Alexandre Julliard
31 Aug '15
31 Aug '15
Module: wine Branch: master Commit: 6abe9f0920b33e33eebc2c5c60aaf7307f4ed210 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6abe9f0920b33e33eebc2c5c6…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Aug 28 08:22:33 2015 -0500 xaudio2/tests: Add callback tests. --- dlls/xaudio2_7/tests/xaudio2.c | 307 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 305 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6abe9f0920b33e33eebc2…
1
0
0
0
Andrew Eikum : xaudio2: Add a simple audio streaming test.
by Alexandre Julliard
31 Aug '15
31 Aug '15
Module: wine Branch: master Commit: 5423b2353bac65e25a02e78920bc775ec93f2e06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5423b2353bac65e25a02e7892…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Aug 28 08:22:29 2015 -0500 xaudio2: Add a simple audio streaming test. --- dlls/xaudio2_7/tests/xaudio2.c | 127 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 3 deletions(-) diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c index 669e5ed..01fabd6 100644 --- a/dlls/xaudio2_7/tests/xaudio2.c +++ b/dlls/xaudio2_7/tests/xaudio2.c @@ -17,17 +17,111 @@ */ #include <windows.h> +#include <math.h> #define COBJMACROS #include "wine/test.h" #include "initguid.h" #include "xaudio2.h" +#include "mmsystem.h" static BOOL xaudio27; static HRESULT (WINAPI *pXAudio2Create)(IXAudio2 **, UINT32, XAUDIO2_PROCESSOR) = NULL; -static void test_DeviceDetails(IXAudio27 *xa) +#define XA2CALL_0(method) if(xaudio27) hr = IXAudio27_##method((IXAudio27*)xa); else hr = IXAudio2_##method(xa); +#define XA2CALL_V(method, ...) if(xaudio27) IXAudio27_##method((IXAudio27*)xa, __VA_ARGS__); else IXAudio2_##method(xa, __VA_ARGS__); +#define XA2CALL(method, ...) if(xaudio27) hr = IXAudio27_##method((IXAudio27*)xa, __VA_ARGS__); else hr = IXAudio2_##method(xa, __VA_ARGS__); + +static void fill_buf(float *buf, WAVEFORMATEX *fmt, DWORD hz, DWORD len_frames) +{ + if(winetest_interactive){ + DWORD offs, c; + for(offs = 0; offs < len_frames; ++offs) + for(c = 0; c < fmt->nChannels; ++c) + buf[offs * fmt->nChannels + c] = sinf(offs * hz * 2 * M_PI / fmt->nSamplesPerSec); + }else + memset(buf, 0, sizeof(float) * len_frames * fmt->nChannels); +} + +static void test_simple_streaming(IXAudio2 *xa) +{ + HRESULT hr; + IXAudio2MasteringVoice *master; + IXAudio2SourceVoice *src, *src2; + WAVEFORMATEX fmt; + XAUDIO2_BUFFER buf, buf2; + XAUDIO2_VOICE_STATE state; + + if(xaudio27) + hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); + else + hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); + ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + + fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; + fmt.nChannels = 2; + fmt.nSamplesPerSec = 44100; + fmt.wBitsPerSample = 32; + fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8; + fmt.nAvgBytesPerSec = fmt.nSamplesPerSec * fmt.nBlockAlign; + fmt.cbSize = 0; + + XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, NULL, NULL, NULL); + ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + + memset(&buf, 0, sizeof(buf)); + buf.AudioBytes = 44100 * fmt.nBlockAlign; + buf.pAudioData = HeapAlloc(GetProcessHeap(), 0, buf.AudioBytes); + fill_buf((float*)buf.pAudioData, &fmt, 440, 44100); + + hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Start failed: %08x\n", hr); + + + XA2CALL(CreateSourceVoice, &src2, &fmt, 0, 1.f, NULL, NULL, NULL); + ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + + memset(&buf2, 0, sizeof(buf2)); + buf2.AudioBytes = 44100 * fmt.nBlockAlign; + buf2.pAudioData = HeapAlloc(GetProcessHeap(), 0, buf2.AudioBytes); + fill_buf((float*)buf2.pAudioData, &fmt, 220, 44100); + + hr = IXAudio2SourceVoice_SubmitSourceBuffer(src2, &buf2, NULL); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_Start(src2, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Start failed: %08x\n", hr); + + while(1){ + if(xaudio27) + IXAudio27SourceVoice_GetState((IXAudio27SourceVoice*)src, &state); + else + IXAudio2SourceVoice_GetState(src, &state, 0); + if(state.SamplesPlayed >= 44100) + break; + Sleep(100); + } + + ok(state.SamplesPlayed == 44100, "Got wrong samples played\n"); + + HeapFree(GetProcessHeap(), 0, (void*)buf.pAudioData); + HeapFree(GetProcessHeap(), 0, (void*)buf2.pAudioData); + + if(xaudio27){ + IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src); + IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src2); + }else{ + IXAudio2SourceVoice_DestroyVoice(src); + IXAudio2SourceVoice_DestroyVoice(src2); + } + IXAudio2MasteringVoice_DestroyVoice(master); +} + +static UINT32 test_DeviceDetails(IXAudio27 *xa) { HRESULT hr; XAUDIO2_DEVICE_DETAILS dd; @@ -37,7 +131,7 @@ static void test_DeviceDetails(IXAudio27 *xa) ok(hr == S_OK, "GetDeviceCount failed: %08x\n", hr); if(count == 0) - return; + return 0; for(i = 0; i < count; ++i){ hr = IXAudio27_GetDeviceDetails(xa, i, &dd); @@ -48,6 +142,22 @@ static void test_DeviceDetails(IXAudio27 *xa) else ok(dd.Role == NotDefaultDevice, "Got wrong role for index %u: 0x%x\n", i, dd.Role); } + + return count; +} + +static UINT32 check_has_devices(IXAudio2 *xa) +{ + HRESULT hr; + IXAudio2MasteringVoice *master; + + hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); + if(hr != S_OK) + return 0; + + IXAudio2MasteringVoice_DestroyVoice(master); + + return 1; } START_TEST(xaudio2) @@ -56,6 +166,7 @@ START_TEST(xaudio2) IXAudio27 *xa27 = NULL; IXAudio2 *xa = NULL; HANDLE xa28dll; + UINT32 has_devices; CoInitialize(NULL); @@ -72,7 +183,11 @@ START_TEST(xaudio2) hr = IXAudio27_Initialize(xa27, 0, XAUDIO2_ANY_PROCESSOR); ok(hr == S_OK, "Initialize failed: %08x\n", hr); - test_DeviceDetails(xa27); + has_devices = test_DeviceDetails(xa27); + if(has_devices){ + test_simple_streaming((IXAudio2*)xa27); + }else + skip("No audio devices available\n"); IXAudio27_Release(xa27); }else @@ -85,6 +200,12 @@ START_TEST(xaudio2) hr = pXAudio2Create(&xa, 0, XAUDIO2_DEFAULT_PROCESSOR); ok(hr == S_OK, "XAudio2Create failed: %08x\n", hr); + has_devices = check_has_devices(xa); + if(has_devices){ + test_simple_streaming(xa); + }else + skip("No audio devices available\n"); + IXAudio2_Release(xa); }else win_skip("XAudio 2.8 not available\n");
1
0
0
0
Andrew Eikum : xaudio2: Implement IXAudio2SourceVoice::FlushSourceBuffers.
by Alexandre Julliard
31 Aug '15
31 Aug '15
Module: wine Branch: master Commit: 66a58ad52a5e0dd9b444dc6b844e939367d2e047 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66a58ad52a5e0dd9b444dc6b8…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Aug 28 08:22:25 2015 -0500 xaudio2: Implement IXAudio2SourceVoice::FlushSourceBuffers. --- dlls/xaudio2_7/xaudio_dll.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index b8fbbc6..48ab3db 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -639,8 +639,45 @@ static HRESULT WINAPI XA2SRC_SubmitSourceBuffer(IXAudio2SourceVoice *iface, static HRESULT WINAPI XA2SRC_FlushSourceBuffers(IXAudio2SourceVoice *iface) { + UINT i, first, last, to_flush; XA2SourceImpl *This = impl_from_IXAudio2SourceVoice(iface); + TRACE("%p\n", This); + + EnterCriticalSection(&This->lock); + + if(This->running && This->nbufs > 0){ + /* when running, flush only completely unused buffers; the rest remain + * in queue */ + last = (This->first_buf + This->nbufs) % XAUDIO2_MAX_QUEUED_BUFFERS; + first = (This->cur_buf + 1) % XAUDIO2_MAX_QUEUED_BUFFERS; + if(This->cur_buf == last) + /* nothing to do */ + to_flush = 0; + else if(last >= first) + to_flush = last - first; + else + to_flush = last + XAUDIO2_MAX_QUEUED_BUFFERS - first; + }else{ + /* when stopped, flush all buffers */ + first = This->first_buf; + last = (This->first_buf + This->nbufs) % XAUDIO2_MAX_QUEUED_BUFFERS; + to_flush = This->nbufs; + } + + + for(i = first; + i < (first + to_flush) % XAUDIO2_MAX_QUEUED_BUFFERS; + i = (i + 1) % XAUDIO2_MAX_QUEUED_BUFFERS){ + if(This->cb) + IXAudio2VoiceCallback_OnBufferEnd(This->cb, + This->buffers[i].xa2buffer.pContext); + } + + This->nbufs -= to_flush; + + LeaveCriticalSection(&This->lock); + return S_OK; }
1
0
0
0
Andrew Eikum : xaudio2: Implement IXAudio2SourceVoice::SetVolume.
by Alexandre Julliard
31 Aug '15
31 Aug '15
Module: wine Branch: master Commit: cb38242821bfb24792b3d15c866a6d3284fea653 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb38242821bfb24792b3d15c8…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Aug 28 08:22:22 2015 -0500 xaudio2: Implement IXAudio2SourceVoice::SetVolume. --- dlls/xaudio2_7/xaudio_dll.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 530318c..b8fbbc6 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -402,7 +402,14 @@ static HRESULT WINAPI XA2SRC_SetVolume(IXAudio2SourceVoice *iface, float Volume, UINT32 OperationSet) { XA2SourceImpl *This = impl_from_IXAudio2SourceVoice(iface); + ALfloat al_gain; + TRACE("%p, %f, 0x%x\n", This, Volume, OperationSet); + + al_gain = Volume; + + alSourcef(This->al_src, AL_GAIN, al_gain); + return S_OK; }
1
0
0
0
Andrew Eikum : configure: Require openal-soft at build-time for xaudio2.
by Alexandre Julliard
31 Aug '15
31 Aug '15
Module: wine Branch: master Commit: 7f72a5f4ed0f09c58bac2364c74d2ce7b4c3b967 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f72a5f4ed0f09c58bac2364c…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Aug 28 08:22:18 2015 -0500 configure: Require openal-soft at build-time for xaudio2. --- configure | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++---- configure.ac | 17 +++++++++++++++-- 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/configure b/configure index afa7bb4..6a5bf0f 100755 --- a/configure +++ b/configure @@ -773,6 +773,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1558,6 +1559,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1810,6 +1812,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1947,7 +1958,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -2100,6 +2111,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -13604,14 +13616,48 @@ fi fi if test "x$ac_cv_lib_openal" != xyes; then : case "x$with_openal" in - x) as_fn_append wine_notices "|libopenal ${notice_platform}development files not found (or too old), OpenAL and XAudio2 won't be supported" ;; + x) as_fn_append wine_notices "|libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported" ;; xno) ;; - *) as_fn_error $? "libopenal ${notice_platform}development files not found (or too old), OpenAL and XAudio2 won't be supported + *) as_fn_error $? "libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported This is an error since --with-openal was requested." "$LINENO" 5 ;; esac fi test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no} -test "x$ac_cv_lib_openal" = xyes || enable_xaudio2_7=${enable_xaudio2_7:-no} + +if test "x$ac_cv_lib_openal" = xyes +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openal-soft" >&5 +$as_echo_n "checking for openal-soft... " >&6; } +if ${ac_cv_have_openalsoft+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <AL/alext.h> +LPALCRENDERSAMPLESSOFT x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_openalsoft=yes +else + ac_cv_have_openalsoft=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_openalsoft" >&5 +$as_echo "$ac_cv_have_openalsoft" >&6; } +fi +if test "x$ac_cv_have_openalsoft" != xyes +then + as_fn_append wine_notices "|openal-soft ${notice_platform}development files not found (or too old), XAudio2 won't be supported" + enable_xaudio2_7=${enable_xaudio2_7:-no} +fi if test "$ac_cv_header_kstat_h" = "yes" then diff --git a/configure.ac b/configure.ac index b592615..aec53f6 100644 --- a/configure.ac +++ b/configure.ac @@ -1738,9 +1738,22 @@ then AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,) fi WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes], - [libopenal ${notice_platform}development files not found (or too old), OpenAL and XAudio2 won't be supported]) + [libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported]) test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no} -test "x$ac_cv_lib_openal" = xyes || enable_xaudio2_7=${enable_xaudio2_7:-no} + +dnl **** Check for openal-soft **** +if test "x$ac_cv_lib_openal" = xyes +then + AC_CACHE_CHECK([for openal-soft], ac_cv_have_openalsoft, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include <AL/alext.h> +LPALCRENDERSAMPLESSOFT x;]])],[ac_cv_have_openalsoft=yes],[ac_cv_have_openalsoft=no])) +fi +if test "x$ac_cv_have_openalsoft" != xyes +then + WINE_NOTICE([openal-soft ${notice_platform}development files not found (or too old), XAudio2 won't be supported]) + enable_xaudio2_7=${enable_xaudio2_7:-no} +fi dnl **** Check for libkstat **** if test "$ac_cv_header_kstat_h" = "yes"
1
0
0
0
Vincent Povirk : comdlg32: Show open dropdown menu on button press.
by Alexandre Julliard
28 Aug '15
28 Aug '15
Module: wine Branch: master Commit: 6056a3f1634a72e181fb3a03ca625aaa7720523e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6056a3f1634a72e181fb3a03c…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 24 14:51:10 2015 -0500 comdlg32: Show open dropdown menu on button press. --- dlls/comdlg32/itemdlg.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 342d5fa..8a52d71 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -1822,6 +1822,25 @@ static void update_control_text(FileDialogImpl *This) } } +static LRESULT CALLBACK dropdown_subclass_proc(HWND hwnd, UINT umessage, WPARAM wparam, LPARAM lparam) +{ + static const WCHAR prop_this[] = {'i','t','e','m','d','l','g','_','T','h','i','s',0}; + static const WCHAR prop_oldwndproc[] = {'i','t','e','m','d','l','g','_','o','l','d','w','n','d','p','r','o','c',0}; + + if (umessage == WM_LBUTTONDOWN) + { + FileDialogImpl *This = (FileDialogImpl*)GetPropW(hwnd, prop_this); + + SendMessageW(hwnd, BM_SETCHECK, BST_CHECKED, 0); + show_opendropdown(This); + SendMessageW(hwnd, BM_SETCHECK, BST_UNCHECKED, 0); + + return 0; + } + + return CallWindowProcW((WNDPROC)GetPropW(hwnd, prop_oldwndproc), hwnd, umessage, wparam, lparam); +} + static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam) { FileDialogImpl *This = (FileDialogImpl*)lParam; @@ -1883,6 +1902,8 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam) LOGFONTW lfw, lfw_marlett; HFONT dialog_font; static const WCHAR marlett[] = {'M','a','r','l','e','t','t',0}; + static const WCHAR prop_this[] = {'i','t','e','m','d','l','g','_','T','h','i','s',0}; + static const WCHAR prop_oldwndproc[] = {'i','t','e','m','d','l','g','_','o','l','d','w','n','d','p','r','o','c',0}; dropdown_hwnd = GetDlgItem(This->dlg_hwnd, psh1); @@ -1899,6 +1920,11 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam) This->hfont_opendropdown = CreateFontIndirectW(&lfw_marlett); SendMessageW(dropdown_hwnd, WM_SETFONT, (LPARAM)This->hfont_opendropdown, 0); + + /* Subclass button so we can handle LBUTTONDOWN */ + SetPropW(dropdown_hwnd, prop_this, (HANDLE)This); + SetPropW(dropdown_hwnd, prop_oldwndproc, + (HANDLE)SetWindowLongPtrW(dropdown_hwnd, GWLP_WNDPROC, (LONG_PTR)dropdown_subclass_proc)); } ctrl_container_reparent(This, This->dlg_hwnd);
1
0
0
0
Vincent Povirk : comdlg32: Show and hide the open dropdown menu dynamically.
by Alexandre Julliard
28 Aug '15
28 Aug '15
Module: wine Branch: master Commit: bc0abc23691bbab1456dfc17cb50beabd1dd47fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc0abc23691bbab1456dfc17c…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Aug 21 15:51:51 2015 -0500 comdlg32: Show and hide the open dropdown menu dynamically. --- dlls/comdlg32/comdlg32.rc | 2 +- dlls/comdlg32/itemdlg.c | 97 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 80 insertions(+), 19 deletions(-) diff --git a/dlls/comdlg32/comdlg32.rc b/dlls/comdlg32/comdlg32.rc index e4dbd8a..f5c1c9e 100644 --- a/dlls/comdlg32/comdlg32.rc +++ b/dlls/comdlg32/comdlg32.rc @@ -490,7 +490,7 @@ FONT 8, "MS Shell Dlg" COMBOBOX IDC_FILETYPE, 226, 256, 100, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | WS_CLIPSIBLINGS | CBS_HASSTRINGS | CBS_DROPDOWNLIST - DEFPUSHBUTTON "&Open", IDOK, 350, 240, 40, 14, WS_GROUP | WS_CLIPSIBLINGS + DEFPUSHBUTTON "&Open", IDOK, 350, 240, 32, 14, WS_GROUP | WS_CLIPSIBLINGS /* drop-down menu for open button */ CONTROL "#msgctxt#do not translate#6", psh1, "Button", WS_CHILD | WS_CLIPSIBLINGS | WS_GROUP | WS_TABSTOP | diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 9a028c5..342d5fa 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -1435,6 +1435,64 @@ static HRESULT init_custom_controls(FileDialogImpl *This) /************************************************************************** * Window related functions. */ +static BOOL update_open_dropdown(FileDialogImpl *This) +{ + /* Show or hide the open dropdown button as appropriate */ + BOOL show=FALSE, showing; + HWND open_hwnd, dropdown_hwnd; + + if (This->hmenu_opendropdown) + { + INT num_visible_items=0; + cctrl_item* item; + + LIST_FOR_EACH_ENTRY(item, &This->cctrl_opendropdown.sub_items, cctrl_item, entry) + { + if (item->cdcstate & CDCS_VISIBLE) + { + num_visible_items++; + if (num_visible_items >= 2) + { + show = TRUE; + break; + } + } + } + } + + open_hwnd = GetDlgItem(This->dlg_hwnd, IDOK); + dropdown_hwnd = GetDlgItem(This->dlg_hwnd, psh1); + + showing = (GetWindowLongPtrW(dropdown_hwnd, GWL_STYLE) & WS_VISIBLE) != 0; + + if (showing != show) + { + RECT open_rc, dropdown_rc; + + GetWindowRect(open_hwnd, &open_rc); + GetWindowRect(dropdown_hwnd, &dropdown_rc); + + if (show) + { + ShowWindow(dropdown_hwnd, SW_SHOW); + + SetWindowPos(open_hwnd, NULL, 0, 0, + (open_rc.right - open_rc.left) - (dropdown_rc.right - dropdown_rc.left), + open_rc.bottom - open_rc.top, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); + } + else + { + ShowWindow(dropdown_hwnd, SW_HIDE); + + SetWindowPos(open_hwnd, NULL, 0, 0, + (open_rc.right - open_rc.left) + (dropdown_rc.right - dropdown_rc.left), + open_rc.bottom - open_rc.top, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); + } + } + + return show; +} + static void update_layout(FileDialogImpl *This) { HDWP hdwp; @@ -1445,6 +1503,7 @@ static void update_layout(FileDialogImpl *This) RECT toolbar_rc, ebrowser_rc, customctrls_rc; static const UINT vspacing = 4, hspacing = 4; static const UINT min_width = 320, min_height = 200; + BOOL show_dropdown; if (!GetClientRect(This->dlg_hwnd, &dialog_rc)) { @@ -1478,7 +1537,9 @@ static void update_layout(FileDialogImpl *This) } /* Open/Save dropdown */ - if(This->hmenu_opendropdown) + show_dropdown = update_open_dropdown(This); + + if(show_dropdown) { int dropdown_width, dropdown_height; hwnd = GetDlgItem(This->dlg_hwnd, psh1); @@ -1728,13 +1789,21 @@ static void init_toolbar(FileDialogImpl *This, HWND hwnd) static void update_control_text(FileDialogImpl *This) { HWND hitem; + LPCWSTR custom_okbutton; + cctrl_item* item; + if(This->custom_title) SetWindowTextW(This->dlg_hwnd, This->custom_title); - if(This->custom_okbutton && + if(This->hmenu_opendropdown && (item = get_first_item(&This->cctrl_opendropdown))) + custom_okbutton = item->label; + else + custom_okbutton = This->custom_okbutton; + + if(custom_okbutton && (hitem = GetDlgItem(This->dlg_hwnd, IDOK))) { - SetWindowTextW(hitem, This->custom_okbutton); + SetWindowTextW(hitem, custom_okbutton); ctrl_resize(hitem, 50, 250, FALSE); } @@ -1810,25 +1879,13 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam) if(This->hmenu_opendropdown) { - RECT open_rc, dropdown_rc; - HWND open_hwnd, dropdown_hwnd; + HWND dropdown_hwnd; LOGFONTW lfw, lfw_marlett; HFONT dialog_font; static const WCHAR marlett[] = {'M','a','r','l','e','t','t',0}; - open_hwnd = GetDlgItem(This->dlg_hwnd, IDOK); dropdown_hwnd = GetDlgItem(This->dlg_hwnd, psh1); - /* Show dropdown button, and remove its size from the open button */ - ShowWindow(dropdown_hwnd, SW_SHOW); - - GetWindowRect(open_hwnd, &open_rc); - GetWindowRect(dropdown_hwnd, &dropdown_rc); - - SetWindowPos(open_hwnd, NULL, 0, 0, - (open_rc.right - open_rc.left) - (dropdown_rc.right - dropdown_rc.left), - open_rc.bottom - open_rc.top, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); - /* Change dropdown button font to Marlett */ dialog_font = (HFONT)SendMessageW(dropdown_hwnd, WM_GETFONT, 0, 0); @@ -1843,8 +1900,6 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam) SendMessageW(dropdown_hwnd, WM_SETFONT, (LPARAM)This->hfont_opendropdown, 0); } - else - ShowWindow(GetDlgItem(This->dlg_hwnd, psh1), SW_HIDE); ctrl_container_reparent(This, This->dlg_hwnd); init_explorerbrowser(This); @@ -4087,6 +4142,12 @@ static HRESULT WINAPI IFileDialogCustomize_fnSetControlItemState(IFileDialogCust item->cdcstate = dwState; + if (ctrl->type == IDLG_CCTRL_OPENDROPDOWN) + { + update_control_text(This); + update_layout(This); + } + return S_OK; } default:
1
0
0
0
Vincent Povirk : comdlg32: Implement open dropdown menu.
by Alexandre Julliard
28 Aug '15
28 Aug '15
Module: wine Branch: master Commit: c5c5163e61971392f6018931a9324ce21588d2d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5c5163e61971392f6018931a…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Aug 19 13:36:59 2015 -0500 comdlg32: Implement open dropdown menu. --- dlls/comdlg32/comdlg32.rc | 5 ++ dlls/comdlg32/itemdlg.c | 164 ++++++++++++++++++++++++++++++++++++++++-- dlls/comdlg32/tests/itemdlg.c | 4 +- po/ar.po | 4 +- po/bg.po | 4 +- po/ca.po | 4 +- po/cs.po | 4 +- po/da.po | 4 +- po/de.po | 4 +- po/el.po | 4 +- po/en.po | 4 +- po/en_US.po | 4 +- po/eo.po | 4 +- po/es.po | 4 +- po/fa.po | 4 +- po/fi.po | 4 +- po/fr.po | 4 +- po/he.po | 4 +- po/hi.po | 4 +- po/hr.po | 4 +- po/hu.po | 4 +- po/it.po | 4 +- po/ja.po | 4 +- po/ko.po | 4 +- po/lt.po | 4 +- po/ml.po | 4 +- po/nb_NO.po | 4 +- po/nl.po | 4 +- po/or.po | 4 +- po/pa.po | 4 +- po/pl.po | 4 +- po/pt_BR.po | 4 +- po/pt_PT.po | 4 +- po/rm.po | 4 +- po/ro.po | 4 +- po/ru.po | 4 +- po/sk.po | 4 +- po/sl.po | 4 +- po/sr_RS(a)cyrillic.po | 4 +- po/sr_RS(a)latin.po | 4 +- po/sv.po | 4 +- po/te.po | 4 +- po/th.po | 4 +- po/tr.po | 4 +- po/uk.po | 4 +- po/wa.po | 4 +- po/wine.pot | 4 +- po/zh_CN.po | 4 +- po/zh_TW.po | 4 +- 49 files changed, 259 insertions(+), 98 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c5c5163e61971392f6018…
1
0
0
0
Józef Kucia : d3d11: Move d3d11 device implementation to top of file.
by Alexandre Julliard
28 Aug '15
28 Aug '15
Module: wine Branch: master Commit: c9ce47c6a993b048b2adef8174b21729e5d0204a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c9ce47c6a993b048b2adef817…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Aug 28 00:39:16 2015 +0200 d3d11: Move d3d11 device implementation to top of file. Just to use d311 device static methods in d3d10 device freely. --- dlls/d3d11/device.c | 3714 +++++++++++++++++++++++++-------------------------- 1 file changed, 1857 insertions(+), 1857 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c9ce47c6a993b048b2ade…
1
0
0
0
Józef Kucia : d3d11: Implement d3d11_texture2d_GetDesc().
by Alexandre Julliard
28 Aug '15
28 Aug '15
Module: wine Branch: master Commit: acec54e707ddc8f8cbca6e6acb4a7e7d70d27047 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=acec54e707ddc8f8cbca6e6ac…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Aug 28 00:39:15 2015 +0200 d3d11: Implement d3d11_texture2d_GetDesc(). --- dlls/d3d11/d3d11_private.h | 15 ++++- dlls/d3d11/device.c | 14 +++- dlls/d3d11/texture.c | 50 +++++++++----- dlls/d3d11/utils.c | 161 ++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 211 insertions(+), 29 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=acec54e707ddc8f8cbca6…
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
51
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Results per page:
10
25
50
100
200