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
December 2012
----- 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
549 discussions
Start a n
N
ew thread
Andrew Eikum : winmm: Reroute WAVE_MAPPER devices as the default device changes.
by Alexandre Julliard
28 Dec '12
28 Dec '12
Module: wine Branch: master Commit: 8f03c51e55ee2cdf8323b7712c6585a170fc025c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f03c51e55ee2cdf8323b7712…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Dec 27 14:05:55 2012 -0600 winmm: Reroute WAVE_MAPPER devices as the default device changes. --- dlls/winmm/waveform.c | 375 +++++++++++++++++++++++++++++++++---------------- 1 files changed, 252 insertions(+), 123 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8f03c51e55ee2cdf8323b…
1
0
0
0
Marcus Meissner : xmllite: Remove duplicated statement (Coverity).
by Alexandre Julliard
28 Dec '12
28 Dec '12
Module: wine Branch: master Commit: bc5d953f7e9112757838c82a3bc672784223e230 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc5d953f7e9112757838c82a3…
Author: Marcus Meissner <meissner(a)suse.de> Date: Thu Dec 27 20:03:58 2012 +0100 xmllite: Remove duplicated statement (Coverity). --- dlls/xmllite/reader.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index 38c7a5e..c802550 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -845,7 +845,6 @@ static HRESULT reader_parse_misc(xmlreader *reader) break; if (FAILED(hr)) return hr; - cur = reader_get_cur(reader); } return hr;
1
0
0
0
Marcus Meissner : advapi32: Do not use invalid pSD value (Coverity).
by Alexandre Julliard
28 Dec '12
28 Dec '12
Module: wine Branch: master Commit: 7750dd8ec4950de529b9163be23d3ee6c0a92bc3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7750dd8ec4950de529b9163be…
Author: Marcus Meissner <meissner(a)suse.de> Date: Thu Dec 27 20:00:27 2012 +0100 advapi32: Do not use invalid pSD value (Coverity). --- dlls/advapi32/tests/service.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index 5fcd4cb..65702ad 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -1853,7 +1853,7 @@ static void test_sequence(void) /* Test using QueryServiceObjectSecurity to obtain security information */ SetLastError(0xdeadbeef); - bret = pQueryServiceObjectSecurity(svc_handle, DACL_SECURITY_INFORMATION, pSD, 0, &n1); + bret = pQueryServiceObjectSecurity(svc_handle, DACL_SECURITY_INFORMATION, NULL, 0, &n1); error = GetLastError(); ok(!bret, "Expected QueryServiceObjectSecurity to fail: result %d\n", bret); ok(error == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", error);
1
0
0
0
Marcus Meissner : winhttp: Do not free name too early (Coverity).
by Alexandre Julliard
28 Dec '12
28 Dec '12
Module: wine Branch: master Commit: ab6369231fbfcb65967e7690a6b1ac7c2c928430 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab6369231fbfcb65967e7690a…
Author: Marcus Meissner <meissner(a)suse.de> Date: Thu Dec 27 19:43:27 2012 +0100 winhttp: Do not free name too early (Coverity). --- dlls/winhttp/session.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index c360a7e..d5aa153 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -1247,7 +1247,6 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url ) strcpy( name, "wpad" ); strcat( name, p ); res = getaddrinfo( name, NULL, NULL, &ai ); - heap_free( name ); if (!res) { *url = build_wpad_url( name, ai ); @@ -1255,10 +1254,12 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url ) if (*url) { TRACE("returning %s\n", debugstr_w(*url)); + heap_free( name ); ret = TRUE; break; } } + heap_free( name ); p++; } heap_free( domain );
1
0
0
0
Marcus Meissner : oleaut32: Mark PropertyPageSiteVtbl static.
by Alexandre Julliard
28 Dec '12
28 Dec '12
Module: wine Branch: master Commit: e0fa39b3e0f6d76be5025647db1226b7e30fad66 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0fa39b3e0f6d76be5025647d…
Author: Marcus Meissner <meissner(a)suse.de> Date: Thu Dec 27 19:31:06 2012 +0100 oleaut32: Mark PropertyPageSiteVtbl static. --- dlls/oleaut32/olepropframe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/olepropframe.c b/dlls/oleaut32/olepropframe.c index 8111e6b..e566266 100644 --- a/dlls/oleaut32/olepropframe.c +++ b/dlls/oleaut32/olepropframe.c @@ -140,7 +140,7 @@ static HRESULT WINAPI PropertyPageSite_TranslateAccelerator( return E_NOTIMPL; } -IPropertyPageSiteVtbl PropertyPageSiteVtbl = { +static IPropertyPageSiteVtbl PropertyPageSiteVtbl = { PropertyPageSite_QueryInterface, PropertyPageSite_AddRef, PropertyPageSite_Release,
1
0
0
0
Marcus Meissner : usp10: Mark SHAPE_ApplyOpenTypePositions as hidden.
by Alexandre Julliard
28 Dec '12
28 Dec '12
Module: wine Branch: master Commit: 02722c4d8e04280588046e9234e30ee3c98cd6a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02722c4d8e04280588046e923…
Author: Marcus Meissner <meissner(a)suse.de> Date: Thu Dec 27 19:30:09 2012 +0100 usp10: Mark SHAPE_ApplyOpenTypePositions as hidden. --- dlls/usp10/usp10_internal.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index e92648c..272e2e0 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -223,7 +223,7 @@ INT BIDI_ReorderV2lLevel(int level, int *pIndexs, const BYTE* plevel, int cch, B INT BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse) DECLSPEC_HIDDEN; void SHAPE_ContextualShaping(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust) DECLSPEC_HIDDEN; void SHAPE_ApplyDefaultOpentypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, INT cChars, WORD *pwLogClust) DECLSPEC_HIDDEN; -void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WORD* pwGlyphs, INT cGlyphs, int *piAdvance, GOFFSET *pGoffset ); +void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WORD* pwGlyphs, INT cGlyphs, int *piAdvance, GOFFSET *pGoffset ) DECLSPEC_HIDDEN; HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa) DECLSPEC_HIDDEN; void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) DECLSPEC_HIDDEN; INT SHAPE_does_GSUB_feature_apply_to_chars(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, const WCHAR *chars, INT write_dir, INT count, const char* feature) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : gdi32: Use the correct physdev for each driver call ( Coverity).
by Alexandre Julliard
28 Dec '12
28 Dec '12
Module: wine Branch: master Commit: 227fc26e63cd922a8a5db9c8d22ff73756e2d398 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=227fc26e63cd922a8a5db9c8d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 27 20:53:25 2012 +0100 gdi32: Use the correct physdev for each driver call (Coverity). --- dlls/gdi32/font.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index fe32167..c6a6946 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -312,7 +312,7 @@ static UINT get_default_smoothing( HKEY key ) static BOOL get_char_positions( DC *dc, const WCHAR *str, INT count, INT *dx, SIZE *size ) { TEXTMETRICW tm; - PHYSDEV dev = GET_DC_PHYSDEV( dc, pGetTextExtentExPoint ); + PHYSDEV dev; size->cx = size->cy = 0; if (!count) return TRUE; @@ -320,6 +320,7 @@ static BOOL get_char_positions( DC *dc, const WCHAR *str, INT count, INT *dx, SI dev = GET_DC_PHYSDEV( dc, pGetTextMetrics ); dev->funcs->pGetTextMetrics( dev, &tm ); + dev = GET_DC_PHYSDEV( dc, pGetTextExtentExPoint ); if (!dev->funcs->pGetTextExtentExPoint( dev, str, count, dx )) return FALSE; if (dc->breakExtra || dc->breakRem) @@ -349,7 +350,7 @@ static BOOL get_char_positions( DC *dc, const WCHAR *str, INT count, INT *dx, SI static BOOL get_char_positions_indices( DC *dc, const WORD *indices, INT count, INT *dx, SIZE *size ) { TEXTMETRICW tm; - PHYSDEV dev = GET_DC_PHYSDEV( dc, pGetTextExtentExPoint ); + PHYSDEV dev; size->cx = size->cy = 0; if (!count) return TRUE; @@ -357,6 +358,7 @@ static BOOL get_char_positions_indices( DC *dc, const WORD *indices, INT count, dev = GET_DC_PHYSDEV( dc, pGetTextMetrics ); dev->funcs->pGetTextMetrics( dev, &tm ); + dev = GET_DC_PHYSDEV( dc, pGetTextExtentExPoint ); if (!dev->funcs->pGetTextExtentExPointI( dev, indices, count, dx )) return FALSE; if (dc->breakExtra || dc->breakRem)
1
0
0
0
Christian Costa : d3dx9_36: Check proper signature for DIB files.
by Alexandre Julliard
27 Dec '12
27 Dec '12
Module: wine Branch: master Commit: dabde6a04f6d02233bc5074a8eba613b2c4adc68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dabde6a04f6d02233bc5074a8…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue Dec 25 10:42:29 2012 +0100 d3dx9_36: Check proper signature for DIB files. --- dlls/d3dx9_36/surface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index fa63e01..999c12e 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -732,7 +732,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(LPCVOID data, UINT datasize, D3D if (FAILED(hr)) { if ((datasize >= 2) && (!strncmp(data, "P3", 2) || !strncmp(data, "P6", 2))) FIXME("File type PPM is not supported yet\n"); - else if ((datasize >= 2) && !strncmp(data, "BM", 2)) + else if ((datasize >= 4) && (*(DWORD*)data == sizeof(BITMAPINFOHEADER))) FIXME("File type DIB is not supported yet\n"); else if ((datasize >= 10) && !strncmp(data, "#?RADIANCE", 10)) FIXME("File type HDR is not supported yet\n");
1
0
0
0
Christian Costa : d3dx9_36: Implement D3DXFileCreate with stubbed ID3DXFile interface + basic tests.
by Alexandre Julliard
27 Dec '12
27 Dec '12
Module: wine Branch: master Commit: 95433ccd3cb53602c472f317008b516fc0b11efc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=95433ccd3cb53602c472f3170…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue Dec 25 10:42:01 2012 +0100 d3dx9_36: Implement D3DXFileCreate with stubbed ID3DXFile interface + basic tests. --- dlls/d3dx9_36/Makefile.in | 3 +- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/tests/Makefile.in | 3 +- dlls/d3dx9_36/tests/xfile.c | 35 +++++++++ dlls/d3dx9_36/xfile.c | 150 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 190 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in index 7bd96a9..1875e9a 100644 --- a/dlls/d3dx9_36/Makefile.in +++ b/dlls/d3dx9_36/Makefile.in @@ -17,7 +17,8 @@ C_SRCS = \ surface.c \ texture.c \ util.c \ - volume.c + volume.c \ + xfile.c RC_SRCS = version.rc diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index ac1d208..a89ab29 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -121,7 +121,7 @@ @ stdcall D3DXDeclaratorFromFVF(long ptr) @ stub D3DXDisassembleEffect(ptr long ptr) @ stub D3DXDisassembleShader(ptr long ptr ptr) -@ stub D3DXFileCreate(ptr) +@ stdcall D3DXFileCreate(ptr) @ stdcall D3DXFillCubeTexture(ptr ptr ptr) @ stub D3DXFillCubeTextureTX(ptr ptr) @ stdcall D3DXFillTexture(ptr ptr ptr) diff --git a/dlls/d3dx9_36/tests/Makefile.in b/dlls/d3dx9_36/tests/Makefile.in index 5384705..c99045c 100644 --- a/dlls/d3dx9_36/tests/Makefile.in +++ b/dlls/d3dx9_36/tests/Makefile.in @@ -11,7 +11,8 @@ C_SRCS = \ shader.c \ surface.c \ texture.c \ - volume.c + volume.c \ + xfile.c RC_SRCS = rsrc.rc diff --git a/dlls/d3dx9_36/tests/xfile.c b/dlls/d3dx9_36/tests/xfile.c new file mode 100644 index 0000000..5500949 --- /dev/null +++ b/dlls/d3dx9_36/tests/xfile.c @@ -0,0 +1,35 @@ +/* + * Copyright 2012 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/test.h" +#include "d3dx9.h" +#include "d3dx9xof.h" + +START_TEST(xfile) +{ + ID3DXFile *file; + HRESULT ret; + + ret = D3DXFileCreate(NULL); + ok(ret == E_POINTER, "D3DXCreateFile returned %#x, expected %#x\n", ret, E_POINTER); + + ret = D3DXFileCreate(&file); + ok(ret == S_OK, "D3DXCreateFile failed with %#x\n", ret); + + file->lpVtbl->Release(file); +} diff --git a/dlls/d3dx9_36/xfile.c b/dlls/d3dx9_36/xfile.c new file mode 100644 index 0000000..ba04857 --- /dev/null +++ b/dlls/d3dx9_36/xfile.c @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2012 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "wine/debug.h" + +#include "d3dx9.h" +#include "d3dx9xof.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +typedef struct { + ID3DXFile ID3DXFile_iface; + LONG ref; +} ID3DXFileImpl; + + +static inline ID3DXFileImpl* impl_from_ID3DXFile(ID3DXFile *iface) +{ + return CONTAINING_RECORD(iface, ID3DXFileImpl, ID3DXFile_iface); +} + + +/*** IUnknown methods ***/ + +static HRESULT WINAPI ID3DXFileImpl_QueryInterface(ID3DXFile *iface, REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXFile)) + { + iface->lpVtbl->AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + WARN("(%p)->(%s, %p), not found\n", iface, debugstr_guid(riid), ret_iface); + *ret_iface = NULL; + return E_NOINTERFACE; +} + + +static ULONG WINAPI ID3DXFileImpl_AddRef(ID3DXFile *iface) +{ + ID3DXFileImpl *This = impl_from_ID3DXFile(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref %d\n", iface, ref); + + return ref; +} + + +static ULONG WINAPI ID3DXFileImpl_Release(ID3DXFile *iface) +{ + ID3DXFileImpl *This = impl_from_ID3DXFile(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref %d\n", iface, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + + +/*** ID3DXFile methods ***/ + +static HRESULT WINAPI ID3DXFileImpl_CreateEnumObject(ID3DXFile *iface, const void *source, D3DXF_FILELOADOPTIONS options, ID3DXFileEnumObject **enum_object) +{ + FIXME("(%p)->(%p, %x, %p): stub\n", iface, source, options, enum_object); + + return E_NOTIMPL; +} + + +static HRESULT WINAPI ID3DXFileImpl_CreateSaveObject(ID3DXFile *iface, const void *data, D3DXF_FILESAVEOPTIONS options, D3DXF_FILEFORMAT format, ID3DXFileSaveObject **save_object) +{ + FIXME("(%p)->(%p, %x, %u, %p): stub\n", iface, data, options, format, save_object); + + return E_NOTIMPL; +} + + +static HRESULT WINAPI ID3DXFileImpl_RegisterTemplates(ID3DXFile *iface, const void *data, SIZE_T size) +{ + FIXME("(%p)->(%p, %lu): stub\n", iface, data, size); + + return E_NOTIMPL; +} + + +static HRESULT WINAPI ID3DXFileImpl_RegisterEnumTemplates(ID3DXFile *iface, ID3DXFileEnumObject *enum_object) +{ + FIXME("(%p)->(%p): stub\n", iface, enum_object); + + return E_NOTIMPL; +} + + +static const ID3DXFileVtbl ID3DXFile_Vtbl = +{ + ID3DXFileImpl_QueryInterface, + ID3DXFileImpl_AddRef, + ID3DXFileImpl_Release, + ID3DXFileImpl_CreateEnumObject, + ID3DXFileImpl_CreateSaveObject, + ID3DXFileImpl_RegisterTemplates, + ID3DXFileImpl_RegisterEnumTemplates +}; + +HRESULT WINAPI D3DXFileCreate(ID3DXFile **d3dxfile) +{ + ID3DXFileImpl *object; + + TRACE("(%p)\n", d3dxfile); + + if (!d3dxfile) + return E_POINTER; + + *d3dxfile = NULL; + + object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXFile_iface.lpVtbl = &ID3DXFile_Vtbl; + object->ref = 1; + + *d3dxfile = &object->ID3DXFile_iface; + + return S_OK; +}
1
0
0
0
Maarten Lankhorst : dsound: Use a thread instead of a timer for greater precision.
by Alexandre Julliard
27 Dec '12
27 Dec '12
Module: wine Branch: master Commit: f5abeb8471df40819679982b03177acd7d82b763 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5abeb8471df40819679982b0…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Wed Dec 19 10:30:04 2012 +0100 dsound: Use a thread instead of a timer for greater precision. --- dlls/dsound/dsound.c | 21 +++++++++++---------- dlls/dsound/dsound_private.h | 7 ++++--- dlls/dsound/mixer.c | 39 +++++++++++++++++++++++---------------- dlls/dsound/primary.c | 27 ++++++++++++++++++++++++--- 4 files changed, 62 insertions(+), 32 deletions(-) diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index ac85ba2..381d0e1 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -670,14 +670,13 @@ ULONG DirectSoundDevice_Release(DirectSoundDevice * device) TRACE("(%p) ref was %u\n", device, ref + 1); if (!ref) { int i; - timeKillEvent(device->timerID); - timeEndPeriod(DS_TIME_RES); - /* The kill event should have allowed the timer process to expire - * but try to grab the lock just in case. Can't hold lock because - * secondarybuffer_destroy also grabs the lock */ - RtlAcquireResourceShared(&(device->buffer_list_lock), TRUE); - RtlReleaseResource(&(device->buffer_list_lock)); + SetEvent(device->sleepev); + if (device->thread) { + WaitForSingleObject(device->thread, INFINITE); + CloseHandle(device->thread); + } + CloseHandle(device->sleepev); EnterCriticalSection(&DSOUND_renderers_lock); list_remove(&device->entry); @@ -813,6 +812,7 @@ HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGUID lpcG device->mmdevice = mmdevice; device->guid = devGUID; + device->sleepev = CreateEventW(0, 0, 0, 0); hr = DSOUND_ReopenDevice(device, FALSE); if (FAILED(hr)) @@ -869,9 +869,10 @@ HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGUID lpcG ZeroMemory(&device->volpan, sizeof(device->volpan)); hr = DSOUND_PrimaryCreate(device); - if (hr == DS_OK) - device->timerID = DSOUND_create_timer(DSOUND_timer, (DWORD_PTR)device); - else + if (hr == DS_OK) { + device->thread = CreateThread(0, 0, DSOUND_mixthread, device, 0, 0); + SetThreadPriority(device->thread, THREAD_PRIORITY_TIME_CRITICAL); + } else WARN("DSOUND_PrimaryCreate failed: %08x\n", hr); *ppDevice = device; diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index 62656a5..1a3900c 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -68,9 +68,9 @@ struct DirectSoundDevice GUID guid; DSCAPS drvcaps; - DWORD priolevel; + DWORD priolevel, sleeptime; PWAVEFORMATEX pwfx, primary_pwfx; - UINT timerID, playing_offs_bytes, in_mmdev_bytes, prebuf; + UINT playing_offs_bytes, in_mmdev_bytes, prebuf; DWORD fraglen; LPBYTE buffer; DWORD writelead, buflen, state, playpos, mixpos; @@ -97,6 +97,7 @@ struct DirectSoundDevice IAudioStreamVolume *volume; IAudioRenderClient *render; + HANDLE sleepev, thread; struct list entry; }; @@ -226,7 +227,7 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan) DECLSPEC_HIDDEN; void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb) DECLSPEC_HIDDEN; DWORD DSOUND_secpos_to_bufpos(const IDirectSoundBufferImpl *dsb, DWORD secpos, DWORD secmixpos, float *overshot) DECLSPEC_HIDDEN; -void CALLBACK DSOUND_timer(UINT timerID, UINT msg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2) DECLSPEC_HIDDEN; +DWORD CALLBACK DSOUND_mixthread(void *ptr) DECLSPEC_HIDDEN; /* sound3d.c */ diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index 84e029b..282808e 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -820,7 +820,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device) DSOUND_PrimaryStop(device); } - } else { + } else if (device->state != STATE_STOPPED) { DSOUND_WaveQueue(device, TRUE); @@ -843,22 +843,29 @@ static void DSOUND_PerformMix(DirectSoundDevice *device) /* **** */ } -void CALLBACK DSOUND_timer(UINT timerID, UINT msg, DWORD_PTR dwUser, - DWORD_PTR dw1, DWORD_PTR dw2) +DWORD CALLBACK DSOUND_mixthread(void *p) { - DirectSoundDevice * device = (DirectSoundDevice*)dwUser; - DWORD start_time = GetTickCount(); - DWORD end_time; - TRACE("(%d,%d,0x%lx,0x%lx,0x%lx)\n",timerID,msg,dwUser,dw1,dw2); - TRACE("entering at %d\n", start_time); - - RtlAcquireResourceShared(&(device->buffer_list_lock), TRUE); - - if (device->ref) - DSOUND_PerformMix(device); + DirectSoundDevice *dev = p; + TRACE("(%p)\n", dev); - RtlReleaseResource(&(device->buffer_list_lock)); + while (dev->ref) { + DWORD ret; - end_time = GetTickCount(); - TRACE("completed processing at %d, duration = %d\n", end_time, end_time - start_time); + /* + * Some audio drivers are retarded and won't fire after being + * stopped, add a timeout to handle this. + */ + ret = WaitForSingleObject(dev->sleepev, dev->sleeptime); + if (ret == WAIT_FAILED) + WARN("wait returned error %u %08x!\n", GetLastError(), GetLastError()); + else if (ret != WAIT_OBJECT_0) + WARN("wait returned %08x!\n", ret); + if (!dev->ref) + break; + + RtlAcquireResourceShared(&(dev->buffer_list_lock), TRUE); + DSOUND_PerformMix(dev); + RtlReleaseResource(&(dev->buffer_list_lock)); + } + return 0; } diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 3ac928b..dd810fd 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -152,6 +152,8 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) REFERENCE_TIME prebuf_rt; WAVEFORMATEX *wfx = NULL; HRESULT hres; + REFERENCE_TIME period; + DWORD period_ms; TRACE("(%p, %d)\n", device, forcewave); @@ -192,14 +194,15 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) prebuf_rt = (10000000 * (UINT64)prebuf_frames) / device->pwfx->nSamplesPerSec; hres = IAudioClient_Initialize(device->client, - AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST, - prebuf_rt, 0, device->pwfx, NULL); + AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST | + AUDCLNT_STREAMFLAGS_EVENTCALLBACK, prebuf_rt, 0, device->pwfx, NULL); if(FAILED(hres)){ IAudioClient_Release(device->client); device->client = NULL; WARN("Initialize failed: %08x\n", hres); return hres; } + IAudioClient_SetEventHandle(device->client, device->sleepev); hres = IAudioClient_GetService(device->client, &IID_IAudioRenderClient, (void**)&device->render); @@ -234,6 +237,24 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) return hres; } + /* Now kick off the timer so the event fires periodically */ + hres = IAudioClient_Start(device->client); + if (FAILED(hres)) + WARN("starting failed with %08x\n", hres); + + hres = IAudioClient_GetStreamLatency(device->client, &period); + if (FAILED(hres)) { + WARN("GetStreamLatency failed with %08x\n", hres); + period_ms = 10; + } else + period_ms = (period + 9999) / 10000; + TRACE("period %u ms fraglen %u prebuf %u\n", period_ms, device->fraglen, device->prebuf); + + if (period_ms < 3) + device->sleeptime = 5; + else + device->sleeptime = period_ms * 5 / 2; + return S_OK; } @@ -379,7 +400,7 @@ HRESULT DSOUND_PrimaryPlay(DirectSoundDevice *device) TRACE("(%p)\n", device); hr = IAudioClient_Start(device->client); - if(FAILED(hr)){ + if(FAILED(hr) && hr != AUDCLNT_E_NOT_STOPPED){ WARN("Start failed: %08x\n", hr); return hr; }
1
0
0
0
← Newer
1
2
3
4
5
...
55
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
Results per page:
10
25
50
100
200