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
May 2017
----- 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
640 discussions
Start a n
N
ew thread
Bruno Jesus : ws2_32: Use unsigned interface index on interface_bind_check.
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 1639c23cae273acd5977c454d1c8f29201e4480f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1639c23cae273acd5977c454d…
Author: Bruno Jesus <bjesus(a)codeweavers.com> Date: Wed May 10 22:46:31 2017 -0300 ws2_32: Use unsigned interface index on interface_bind_check. Signed-off-by: Bruno Jesus <bjesus(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 9d27fab..f6db832 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3671,7 +3671,8 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr) #if !defined(IP_BOUND_IF) && !defined(LINUX_BOUND_IF) return; #else - int ifindex; + unsigned int ifindex; + int ret; socklen_t len; /* Check for IPv4, address 0.0.0.0 and UDP socket */ @@ -3680,15 +3681,14 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr) if (_get_fd_type(fd) != SOCK_DGRAM) return; - ifindex = -1; len = sizeof(ifindex); #if defined(IP_BOUND_IF) - getsockopt(fd, IPPROTO_IP, IP_BOUND_IF, &ifindex, &len); + ret = getsockopt(fd, IPPROTO_IP, IP_BOUND_IF, &ifindex, &len); #elif defined(LINUX_BOUND_IF) - getsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, &len); - if (ifindex > 0) ifindex = ntohl(ifindex); + ret = getsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, &len); + if (!ret) ifindex = ntohl(ifindex); #endif - if (ifindex > 0) + if (!ret) { PIP_ADAPTER_INFO adapters, adapter; DWORD adap_size;
1
0
0
0
Jacek Caban : kernel32/tests: Use shorter timeout for wait that we expect to time out.
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 0be75640f512892eb241905f883f1f17a9094c53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0be75640f512892eb241905f8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 11 13:49:01 2017 +0200 kernel32/tests: Use shorter timeout for wait that we expect to time out. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 0546e96..77450e3 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -213,7 +213,7 @@ static void test_CreateNamedPipe(int pipemode) hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError()); - ok(!WaitNamedPipeA(PIPENAME, 1000), "WaitNamedPipe succeeded\n"); + ok(!WaitNamedPipeA(PIPENAME, 100), "WaitNamedPipe succeeded\n"); ok(GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError());
1
0
0
0
Nikolay Sivov : comdlg32: Use existing symbol for Help button id.
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 3c33ebd662c7b05d3a4be68a11dbe063baa229e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c33ebd662c7b05d3a4be68a1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 11 12:13:05 2017 +0300 comdlg32: Use existing symbol for Help button id. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comdlg32/colordlg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index 5e67499..bead9ba 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -865,7 +865,7 @@ static LRESULT CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam ) SetPropW( hDlg, szColourDialogProp, lpp ); if (!(lpp->lpcc->Flags & CC_SHOWHELP)) - ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE); + ShowWindow(GetDlgItem(hDlg, pshHelp), SW_HIDE); lpp->msetrgb = RegisterWindowMessageA(SETRGBSTRINGA); #if 0 @@ -1041,7 +1041,7 @@ static LRESULT CC_WMCommand(CCPRIV *lpp, WPARAM wParam, LPARAM lParam, WORD noti CC_PaintTriangle(lpp); break; - case 0x40e: /* Help! */ /* The Beatles, 1965 ;-) */ + case pshHelp: /* Help! */ /* The Beatles, 1965 ;-) */ i = RegisterWindowMessageA(HELPMSGSTRINGA); if (lpp->lpcc->hwndOwner) SendMessageA(lpp->lpcc->hwndOwner, i, 0, (LPARAM)lpp->lpcc);
1
0
0
0
Michael Stefaniuc : dmusic: Set the dsound pointer to NULL on an error path.
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 3b4909fd9424e299f8ad11fe1deec11579ed9a83 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b4909fd9424e299f8ad11fe1…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu May 11 11:05:51 2017 +0200 dmusic: Set the dsound pointer to NULL on an error path. Spotted by Sebastian Lackner. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmusic/dmusic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index d5d061c..105e6f7 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -298,8 +298,10 @@ static HRESULT WINAPI IDirectMusic8Impl_SetDirectSound(IDirectMusic8 *iface, IDi return hr; hr = IDirectSound_SetCooperativeLevel(This->dsound, hwnd ? hwnd : GetForegroundWindow(), DSSCL_PRIORITY); - if (FAILED(hr)) + if (FAILED(hr)) { IDirectSound_Release(This->dsound); + This->dsound = NULL; + } return hr; }
1
0
0
0
Michael Stefaniuc : dmime: Forward Init() to InitAudio().
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 01c6b4fe640b475da96bcf2517d30f2c287bd9db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=01c6b4fe640b475da96bcf251…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu May 11 11:05:50 2017 +0200 dmime: Forward Init() to InitAudio(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index bbfc04f..2b9c984 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -247,43 +247,12 @@ static ULONG WINAPI IDirectMusicPerformance8Impl_Release(IDirectMusicPerformance /* IDirectMusicPerformanceImpl IDirectMusicPerformance Interface part: */ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init(IDirectMusicPerformance8 *iface, - IDirectMusic **ppDirectMusic, IDirectSound *pDirectSound, HWND hWnd) + IDirectMusic **dmusic, IDirectSound *dsound, HWND hwnd) { - IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); - - FIXME("(iface = %p, dmusic = %p, dsound = %p, hwnd = %p)\n", This, ppDirectMusic, pDirectSound, hWnd); - if (This->dmusic) - return DMUS_E_ALREADY_INITED; - - if (NULL != pDirectSound) { - This->dsound = pDirectSound; - IDirectSound_AddRef(This->dsound); - } else { - DirectSoundCreate8(NULL, (IDirectSound8 **) &This->dsound, NULL); - if (!This->dsound) return DSERR_NODRIVER; + TRACE("(%p, %p, %p, %p)\n", iface, dmusic, dsound, hwnd); - if (!hWnd) - hWnd = GetForegroundWindow(); - IDirectSound_SetCooperativeLevel(This->dsound, hWnd, DSSCL_PRIORITY); - } - - if (NULL != ppDirectMusic && NULL != *ppDirectMusic) { - /* app creates its own dmusic object and gives it to performance */ - This->dmusic = (IDirectMusic8 *)*ppDirectMusic; - IDirectMusic8_AddRef(This->dmusic); - } else { - HRESULT hr; - /* App enables the performance to initialize itself and needs a pointer to object */ - hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8, (void **)&This->dmusic); - if (FAILED(hr)) - return hr; - if (ppDirectMusic) { - *ppDirectMusic = (IDirectMusic *)This->dmusic; - IDirectMusic8_AddRef((LPDIRECTMUSIC8)*ppDirectMusic); - } - } - - return S_OK; + return IDirectMusicPerformance8_InitAudio(iface, dmusic, dsound ? &dsound : NULL, hwnd, 0, 0, + 0, NULL); } static HRESULT WINAPI IDirectMusicPerformance8Impl_PlaySegment(IDirectMusicPerformance8 *iface,
1
0
0
0
Michael Stefaniuc : dmime: Finish the cleanup of InitAudio().
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 3236e4ccab754eac8a14ff94efc19db8fae898e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3236e4ccab754eac8a14ff94e…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu May 11 11:05:49 2017 +0200 dmime: Finish the cleanup of InitAudio(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 2bd34d5..bbfc04f 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -28,8 +28,7 @@ typedef struct IDirectMusicPerformance8Impl { IDirectMusic8 *dmusic; IDirectSound *dsound; IDirectMusicGraph *pToolGraph; - DMUS_AUDIOPARAMS pParams; - /* global parameters */ + DMUS_AUDIOPARAMS params; BOOL fAutoDownload; char cMasterGrooveLevel; float fMasterTempo; @@ -892,14 +891,14 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_RhythmToTime(IDirectMusicPerf /* IDirectMusicPerformance8 Interface part follow: */ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerformance8 *iface, - IDirectMusic **dmusic, IDirectSound **dsound, HWND hwnd, - DWORD dwDefaultPathType, DWORD dwPChannelCount, DWORD dwFlags, DMUS_AUDIOPARAMS* pParams) + IDirectMusic **dmusic, IDirectSound **dsound, HWND hwnd, DWORD default_path_type, + DWORD num_channels, DWORD flags, DMUS_AUDIOPARAMS *params) { IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); HRESULT hr = S_OK; - TRACE("(%p, %p, %p, %p, %x, %u, %x, %p)\n", This, dmusic, dsound, hwnd, dwDefaultPathType, - dwPChannelCount, dwFlags, pParams); + TRACE("(%p, %p, %p, %p, %x, %u, %x, %p)\n", This, dmusic, dsound, hwnd, default_path_type, + num_channels, flags, params); if (This->dmusic) return DMUS_E_ALREADY_INITED; @@ -929,26 +928,25 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerform if (dsound) IDirectSound_AddRef(This->dsound); - /* as seen in msdn we need params init before audio path creation */ - if (NULL != pParams) { - This->pParams = *pParams; - } else { - /* TODO, how can i fill the struct as seen on msdn */ - memset(&This->pParams, 0, sizeof(DMUS_AUDIOPARAMS)); - This->pParams.dwSize = sizeof(DMUS_AUDIOPARAMS); - This->pParams.fInitNow = FALSE; - This->pParams.dwValidData = DMUS_AUDIOPARAMS_FEATURES | DMUS_AUDIOPARAMS_VOICES | DMUS_AUDIOPARAMS_SAMPLERATE | DMUS_AUDIOPARAMS_DEFAULTSYNTH; - This->pParams.dwVoices = 64; - This->pParams.dwSampleRate = (DWORD) 22.050; - This->pParams.dwFeatures = dwFlags; - This->pParams.clsidDefaultSynth = CLSID_DirectMusicSynthSink; - } - if(dwDefaultPathType != 0) - hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, dwDefaultPathType, dwPChannelCount, FALSE, &This->pDefaultPath); + if (!params) { + This->params.dwSize = sizeof(DMUS_AUDIOPARAMS); + This->params.fInitNow = FALSE; + This->params.dwValidData = DMUS_AUDIOPARAMS_FEATURES | DMUS_AUDIOPARAMS_VOICES | + DMUS_AUDIOPARAMS_SAMPLERATE | DMUS_AUDIOPARAMS_DEFAULTSYNTH; + This->params.dwVoices = 64; + This->params.dwSampleRate = 22050; + This->params.dwFeatures = flags; + This->params.clsidDefaultSynth = CLSID_DirectMusicSynthSink; + } else + This->params = *params; + + if (default_path_type) + hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, default_path_type, + num_channels, FALSE, &This->pDefaultPath); - PostMessageToProcessMsgThread(This, PROCESSMSG_START); + PostMessageToProcessMsgThread(This, PROCESSMSG_START); - return hr; + return hr; } static HRESULT WINAPI IDirectMusicPerformance8Impl_PlaySegmentEx(IDirectMusicPerformance8 *iface,
1
0
0
0
Michael Stefaniuc : dmime: Do not use Init() from InitAudio().
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 26011d2d3e3c0d616ef8c738c7941bffcb919396 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26011d2d3e3c0d616ef8c738c…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu May 11 11:05:48 2017 +0200 dmime: Do not use Init() from InitAudio(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 292ae80..2bd34d5 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -892,17 +892,30 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_RhythmToTime(IDirectMusicPerf /* IDirectMusicPerformance8 Interface part follow: */ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerformance8 *iface, - IDirectMusic **ppDirectMusic, IDirectSound **dsound, HWND hwnd, + IDirectMusic **dmusic, IDirectSound **dsound, HWND hwnd, DWORD dwDefaultPathType, DWORD dwPChannelCount, DWORD dwFlags, DMUS_AUDIOPARAMS* pParams) { IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); HRESULT hr = S_OK; - TRACE("(%p, %p, %p, %p, %x, %u, %x, %p)\n", This, ppDirectMusic, dsound, hwnd, dwDefaultPathType, dwPChannelCount, dwFlags, pParams); + TRACE("(%p, %p, %p, %p, %x, %u, %x, %p)\n", This, dmusic, dsound, hwnd, dwDefaultPathType, + dwPChannelCount, dwFlags, pParams); if (This->dmusic) return DMUS_E_ALREADY_INITED; + if (!dmusic || !*dmusic) { + hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8, + (void **)&This->dmusic); + if (FAILED(hr)) + return hr; + if (dmusic) + *dmusic = (IDirectMusic *)This->dmusic; + } else + This->dmusic = (IDirectMusic8 *)*dmusic; + if (dmusic) + IDirectMusic8_AddRef(This->dmusic); + if (!dsound || !*dsound) { hr = DirectSoundCreate8(NULL, (IDirectSound8 **)&This->dsound, NULL); if (FAILED(hr)) @@ -913,12 +926,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerform *dsound = This->dsound; } else This->dsound = *dsound; - - IDirectMusicPerformance8_Init(iface, ppDirectMusic, This->dsound, hwnd); - - /* Init increases the ref count of the dsound object. Decrement it if the app doesn't want a pointer to the object. */ - if (!dsound) - IDirectSound_Release(This->dsound); + if (dsound) + IDirectSound_AddRef(This->dsound); /* as seen in msdn we need params init before audio path creation */ if (NULL != pParams) {
1
0
0
0
Michael Stefaniuc : dmime: Finish the reindentation in CloseDown().
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 3a145ac92b0e0f2226a6d20999bc8b2117969f01 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a145ac92b0e0f2226a6d2099…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu May 11 11:05:47 2017 +0200 dmime: Finish the reindentation in CloseDown(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 57ee670..292ae80 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -820,14 +820,15 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AdjustTime(IDirectMusicPerfor static HRESULT WINAPI IDirectMusicPerformance8Impl_CloseDown(IDirectMusicPerformance8 *iface) { - IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); + IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); - FIXME("(%p): stub\n", This); - if (PostMessageToProcessMsgThread(This, PROCESSMSG_EXIT)) { - WaitForSingleObject(This->procThread, INFINITE); - This->procThreadTicStarted = FALSE; - CloseHandle(This->procThread); - } + FIXME("(%p): semi-stub\n", This); + + if (PostMessageToProcessMsgThread(This, PROCESSMSG_EXIT)) { + WaitForSingleObject(This->procThread, INFINITE); + This->procThreadTicStarted = FALSE; + CloseHandle(This->procThread); + } if (This->dsound) { IDirectSound_Release(This->dsound); This->dsound = NULL;
1
0
0
0
Michael Stefaniuc : dmime: Avoid a temporary variable in IDirectMusicPerformance8Impl_InitAudio().
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: 9572b5f6d34d82c0abe179f45a1cd4e5f4278dd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9572b5f6d34d82c0abe179f45…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu May 11 11:05:46 2017 +0200 dmime: Avoid a temporary variable in IDirectMusicPerformance8Impl_InitAudio(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 70 ++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 2c94123..57ee670 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -26,7 +26,7 @@ typedef struct IDirectMusicPerformance8Impl { IDirectMusicPerformance8 IDirectMusicPerformance8_iface; LONG ref; IDirectMusic8 *dmusic; - IDirectSound *pDirectSound; + IDirectSound *dsound; IDirectMusicGraph *pToolGraph; DMUS_AUDIOPARAMS pParams; /* global parameters */ @@ -257,15 +257,15 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init(IDirectMusicPerformance8 return DMUS_E_ALREADY_INITED; if (NULL != pDirectSound) { - This->pDirectSound = pDirectSound; - IDirectSound_AddRef(This->pDirectSound); + This->dsound = pDirectSound; + IDirectSound_AddRef(This->dsound); } else { - DirectSoundCreate8(NULL, (LPDIRECTSOUND8*) &This->pDirectSound, NULL); - if (!This->pDirectSound) return DSERR_NODRIVER; + DirectSoundCreate8(NULL, (IDirectSound8 **) &This->dsound, NULL); + if (!This->dsound) return DSERR_NODRIVER; if (!hWnd) hWnd = GetForegroundWindow(); - IDirectSound_SetCooperativeLevel(This->pDirectSound, hWnd, DSSCL_PRIORITY); + IDirectSound_SetCooperativeLevel(This->dsound, hWnd, DSSCL_PRIORITY); } if (NULL != ppDirectMusic && NULL != *ppDirectMusic) { @@ -828,10 +828,10 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CloseDown(IDirectMusicPerform This->procThreadTicStarted = FALSE; CloseHandle(This->procThread); } - if (NULL != This->pDirectSound) { - IDirectSound_Release(This->pDirectSound); - This->pDirectSound = NULL; - } + if (This->dsound) { + IDirectSound_Release(This->dsound); + This->dsound = NULL; + } if (This->dmusic) { IDirectMusic8_Release(This->dmusic); This->dmusic = NULL; @@ -891,38 +891,33 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_RhythmToTime(IDirectMusicPerf /* IDirectMusicPerformance8 Interface part follow: */ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerformance8 *iface, - IDirectMusic **ppDirectMusic, IDirectSound **ppDirectSound, HWND hWnd, + IDirectMusic **ppDirectMusic, IDirectSound **dsound, HWND hwnd, DWORD dwDefaultPathType, DWORD dwPChannelCount, DWORD dwFlags, DMUS_AUDIOPARAMS* pParams) { - IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); - IDirectSound* dsound = NULL; - HRESULT hr = S_OK; + IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); + HRESULT hr = S_OK; - FIXME("(%p, %p, %p, %p, %x, %u, %x, %p): to check\n", This, ppDirectMusic, ppDirectSound, hWnd, dwDefaultPathType, dwPChannelCount, dwFlags, pParams); + TRACE("(%p, %p, %p, %p, %x, %u, %x, %p)\n", This, ppDirectMusic, dsound, hwnd, dwDefaultPathType, dwPChannelCount, dwFlags, pParams); - if (This->dmusic) - return DMUS_E_ALREADY_INITED; + if (This->dmusic) + return DMUS_E_ALREADY_INITED; - if (NULL != ppDirectSound && NULL != *ppDirectSound) { - dsound = *ppDirectSound; - } else { - hr = DirectSoundCreate8 (NULL, (LPDIRECTSOUND8*) &dsound, NULL); - FIXME("return dsound(%p,%d)\n", dsound, hr); - if (FAILED(hr) || !dsound) - return DSERR_NODRIVER; - if (!hWnd) - hWnd = GetForegroundWindow(); - IDirectSound_SetCooperativeLevel(dsound, hWnd, DSSCL_PRIORITY); - if (ppDirectSound) - *ppDirectSound = dsound; - } + if (!dsound || !*dsound) { + hr = DirectSoundCreate8(NULL, (IDirectSound8 **)&This->dsound, NULL); + if (FAILED(hr)) + return hr; + IDirectSound_SetCooperativeLevel(This->dsound, hwnd ? hwnd : GetForegroundWindow(), + DSSCL_PRIORITY); + if (dsound) + *dsound = This->dsound; + } else + This->dsound = *dsound; - IDirectMusicPerformance8_Init(iface, ppDirectMusic, dsound, hWnd); + IDirectMusicPerformance8_Init(iface, ppDirectMusic, This->dsound, hwnd); - /* Init increases the ref count of the dsound object. Decrement it if the app doesn't want a pointer to the object. */ - if (NULL == ppDirectSound) { - IDirectSound_Release(This->pDirectSound); - } + /* Init increases the ref count of the dsound object. Decrement it if the app doesn't want a pointer to the object. */ + if (!dsound) + IDirectSound_Release(This->dsound); /* as seen in msdn we need params init before audio path creation */ if (NULL != pParams) { @@ -1059,7 +1054,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire } /* FIXME: Should we create one secondary buffer for each PChannel? */ - hr = IDirectSound8_CreateSoundBuffer ((LPDIRECTSOUND8) This->pDirectSound, &desc, &buffer, NULL); + hr = IDirectSound_CreateSoundBuffer(This->dsound, &desc, &buffer, NULL); if (FAILED(hr)) return DSERR_BUFFERLOST; @@ -1068,7 +1063,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire desc.dwBufferBytes = 0; desc.lpwfxFormat = NULL; - hr = IDirectSound8_CreateSoundBuffer ((LPDIRECTSOUND8) This->pDirectSound, &desc, &primary_buffer, NULL); + hr = IDirectSound_CreateSoundBuffer(This->dsound, &desc, &primary_buffer, NULL); if (FAILED(hr)) { IDirectSoundBuffer_Release(buffer); return DSERR_BUFFERLOST; @@ -1203,7 +1198,6 @@ HRESULT WINAPI create_dmperformance(REFIID lpcGUID, void **ppobj) } obj->IDirectMusicPerformance8_iface.lpVtbl = &DirectMusicPerformance8_Vtbl; obj->ref = 0; /* will be inited by QueryInterface */ - obj->pDirectSound = NULL; obj->pDefaultPath = NULL; InitializeCriticalSection(&obj->safe); obj->safe.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectMusicPerformance8Impl*->safe");
1
0
0
0
Michael Stefaniuc : dmime: Simplify the check if the performance was initialized.
by Alexandre Julliard
11 May '17
11 May '17
Module: wine Branch: master Commit: a2685a8bc05475503f8f9660e28e25cebbd1c489 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2685a8bc05475503f8f9660e…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu May 11 11:05:45 2017 +0200 dmime: Simplify the check if the performance was initialized. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index a0f70b0..2c94123 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -25,8 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmime); typedef struct IDirectMusicPerformance8Impl { IDirectMusicPerformance8 IDirectMusicPerformance8_iface; LONG ref; - /* IDirectMusicPerformanceImpl fields */ - IDirectMusic8 *pDirectMusic; + IDirectMusic8 *dmusic; IDirectSound *pDirectSound; IDirectMusicGraph *pToolGraph; DMUS_AUDIOPARAMS pParams; @@ -254,7 +253,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init(IDirectMusicPerformance8 IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); FIXME("(iface = %p, dmusic = %p, dsound = %p, hwnd = %p)\n", This, ppDirectMusic, pDirectSound, hWnd); - if (This->pDirectMusic || This->pDirectSound) + if (This->dmusic) return DMUS_E_ALREADY_INITED; if (NULL != pDirectSound) { @@ -271,16 +270,16 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init(IDirectMusicPerformance8 if (NULL != ppDirectMusic && NULL != *ppDirectMusic) { /* app creates its own dmusic object and gives it to performance */ - This->pDirectMusic = (IDirectMusic8*) *ppDirectMusic; - IDirectMusic8_AddRef(This->pDirectMusic); + This->dmusic = (IDirectMusic8 *)*ppDirectMusic; + IDirectMusic8_AddRef(This->dmusic); } else { HRESULT hr; /* App enables the performance to initialize itself and needs a pointer to object */ - hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8, (void**)&This->pDirectMusic); + hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8, (void **)&This->dmusic); if (FAILED(hr)) return hr; if (ppDirectMusic) { - *ppDirectMusic = (LPDIRECTMUSIC)This->pDirectMusic; + *ppDirectMusic = (IDirectMusic *)This->dmusic; IDirectMusic8_AddRef((LPDIRECTMUSIC8)*ppDirectMusic); } } @@ -601,20 +600,21 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AddPort(IDirectMusicPerforman HRESULT hr = E_FAIL; FIXME("(%p, %p): stub\n", This, pPort); - if (!This->pDirectMusic || !This->pDirectSound) return DMUS_E_NOT_INIT; + if (!This->dmusic) + return DMUS_E_NOT_INIT; if (NULL == pPort) { GUID port_guid; IDirectMusicPort* pDefaultPort = NULL; DMUS_PORTPARAMS params; int i, j; - hr = IDirectMusic8_GetDefaultPort(This->pDirectMusic, &port_guid); + hr = IDirectMusic8_GetDefaultPort(This->dmusic, &port_guid); if (FAILED(hr)) return hr; ZeroMemory(¶ms, sizeof(params)); params.dwSize = sizeof(params); params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_SHARE; params.dwChannelGroups = 1; params.fShare = TRUE; - hr = IDirectMusic8_CreatePort(This->pDirectMusic, &port_guid, ¶ms, &pDefaultPort, NULL); + hr = IDirectMusic8_CreatePort(This->dmusic, &port_guid, ¶ms, &pDefaultPort, NULL); if (FAILED(hr)) return hr; hr = IDirectMusicPort_Activate(pDefaultPort, TRUE); if (FAILED(hr)) { IDirectMusicPort_Release(pDefaultPort); return hr; } @@ -698,8 +698,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_PChannelInfo(IDirectMusicPerf port_params.dwSize = sizeof(DMUS_PORTPARAMS8); port_params.dwValidParams = 0; - IDirectMusic8_GetDefaultPort(This->pDirectMusic, &default_port); - IDirectMusic8_CreatePort(This->pDirectMusic, &default_port, &port_params, port, NULL); + IDirectMusic8_GetDefaultPort(This->dmusic, &default_port); + IDirectMusic8_CreatePort(This->dmusic, &default_port, &port_params, port, NULL); return S_OK; } @@ -832,11 +832,11 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CloseDown(IDirectMusicPerform IDirectSound_Release(This->pDirectSound); This->pDirectSound = NULL; } - if (NULL != This->pDirectMusic) { - IDirectMusic8_Release(This->pDirectMusic); - This->pDirectMusic = NULL; - } - return S_OK; + if (This->dmusic) { + IDirectMusic8_Release(This->dmusic); + This->dmusic = NULL; + } + return S_OK; } static HRESULT WINAPI IDirectMusicPerformance8Impl_GetResolvedTime(IDirectMusicPerformance8 *iface, @@ -900,7 +900,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerform FIXME("(%p, %p, %p, %p, %x, %u, %x, %p): to check\n", This, ppDirectMusic, ppDirectSound, hWnd, dwDefaultPathType, dwPChannelCount, dwFlags, pParams); - if (This->pDirectMusic || This->pDirectSound) + if (This->dmusic) return DMUS_E_ALREADY_INITED; if (NULL != ppDirectSound && NULL != *ppDirectSound) { @@ -1203,7 +1203,6 @@ HRESULT WINAPI create_dmperformance(REFIID lpcGUID, void **ppobj) } obj->IDirectMusicPerformance8_iface.lpVtbl = &DirectMusicPerformance8_Vtbl; obj->ref = 0; /* will be inited by QueryInterface */ - obj->pDirectMusic = NULL; obj->pDirectSound = NULL; obj->pDefaultPath = NULL; InitializeCriticalSection(&obj->safe);
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
64
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
52
53
54
55
56
57
58
59
60
61
62
63
64
Results per page:
10
25
50
100
200