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
November 2023
----- 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
1 participants
989 discussions
Start a n
N
ew thread
Alistair Leslie-Hughes : wmiutils: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: db50069167ba01917353870d5ac5a373b411b14f URL:
https://gitlab.winehq.org/wine/wine/-/commit/db50069167ba01917353870d5ac5a3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Nov 6 09:55:12 2023 +1100 wmiutils: Remove DECLSPEC_HIDDEN usage. --- dlls/wmiutils/wmiutils_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wmiutils/wmiutils_private.h b/dlls/wmiutils/wmiutils_private.h index 791e6123bdb..599b27b41f1 100644 --- a/dlls/wmiutils/wmiutils_private.h +++ b/dlls/wmiutils/wmiutils_private.h @@ -16,5 +16,5 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -HRESULT WbemPath_create(LPVOID *) DECLSPEC_HIDDEN; -HRESULT WbemStatusCodeText_create(LPVOID *) DECLSPEC_HIDDEN; +HRESULT WbemPath_create(LPVOID *); +HRESULT WbemStatusCodeText_create(LPVOID *);
1
0
0
0
Alistair Leslie-Hughes : uxtheme: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: beb3021719428eab14cf04c5f23e4cf7d1c96af6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/beb3021719428eab14cf04c5f23e4c…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Nov 9 18:27:05 2023 +1100 uxtheme: Remove DECLSPEC_HIDDEN usage. --- dlls/uxtheme/msstyles.h | 64 +++++++++++++++++++++++------------------------ dlls/uxtheme/system.c | 2 +- dlls/uxtheme/uxthemedll.h | 38 ++++++++++++++-------------- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/dlls/uxtheme/msstyles.h b/dlls/uxtheme/msstyles.h index 98e1aa045d6..38ff94d8c80 100644 --- a/dlls/uxtheme/msstyles.h +++ b/dlls/uxtheme/msstyles.h @@ -87,37 +87,37 @@ typedef struct _THEME_FILE { typedef struct _UXINI_FILE *PUXINI_FILE; -HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWSTR pszSizeName, PTHEME_FILE *tf) DECLSPEC_HIDDEN; -void MSSTYLES_CloseThemeFile(PTHEME_FILE tf) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf, BOOL setMetrics) DECLSPEC_HIDDEN; -PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, UINT dpi) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc) DECLSPEC_HIDDEN; -BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId) DECLSPEC_HIDDEN; -BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue) DECLSPEC_HIDDEN; -BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszState, int *iPartId, int *iStateId) DECLSPEC_HIDDEN; -PUXINI_FILE MSSTYLES_GetThemeIni(PTHEME_FILE tf) DECLSPEC_HIDDEN; -UINT MSSTYLES_GetThemeDPI(PTHEME_CLASS tc) DECLSPEC_HIDDEN; -PTHEME_PARTSTATE MSSTYLES_FindPart(PTHEME_CLASS tc, int iPartId) DECLSPEC_HIDDEN; -PTHEME_PARTSTATE MSSTYLES_FindPartState(PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext) DECLSPEC_HIDDEN; -PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId) DECLSPEC_HIDDEN; -PTHEME_PROPERTY MSSTYLES_FindMetric(int iPropertyPrimitive, int iPropertyId) DECLSPEC_HIDDEN; -HBITMAP MSSTYLES_LoadBitmap(PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha) DECLSPEC_HIDDEN; - -HRESULT MSSTYLES_GetPropertyBool(PTHEME_PROPERTY tp, BOOL *pfVal) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyColor(PTHEME_PROPERTY tp, COLORREF *pColor) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyFont(PTHEME_PROPERTY tp, HDC hdc, LOGFONTW *pFont) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyInt(PTHEME_PROPERTY tp, int *piVal) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyIntList(PTHEME_PROPERTY tp, INTLIST *pIntList) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyPosition(PTHEME_PROPERTY tp, POINT *pPoint) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyString(PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyRect(PTHEME_PROPERTY tp, RECT *pRect) DECLSPEC_HIDDEN; -HRESULT MSSTYLES_GetPropertyMargins(PTHEME_PROPERTY tp, RECT *prc, MARGINS *pMargins) DECLSPEC_HIDDEN; - -PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) DECLSPEC_HIDDEN; -void UXINI_CloseINI(PUXINI_FILE uf) DECLSPEC_HIDDEN; -LPCWSTR UXINI_GetNextSection(PUXINI_FILE uf, DWORD *dwLen) DECLSPEC_HIDDEN; -BOOL UXINI_FindSection(PUXINI_FILE uf, LPCWSTR lpName) DECLSPEC_HIDDEN; -LPCWSTR UXINI_GetNextValue(PUXINI_FILE uf, DWORD *dwNameLen, LPCWSTR *lpValue, DWORD *dwValueLen) DECLSPEC_HIDDEN; -BOOL UXINI_FindValue(PUXINI_FILE uf, LPCWSTR lpName, LPCWSTR *lpValue, DWORD *dwValueLen) DECLSPEC_HIDDEN; +HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWSTR pszSizeName, PTHEME_FILE *tf); +void MSSTYLES_CloseThemeFile(PTHEME_FILE tf); +HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf, BOOL setMetrics); +PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, UINT dpi); +HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc); +BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId); +BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue); +BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszState, int *iPartId, int *iStateId); +PUXINI_FILE MSSTYLES_GetThemeIni(PTHEME_FILE tf); +UINT MSSTYLES_GetThemeDPI(PTHEME_CLASS tc); +PTHEME_PARTSTATE MSSTYLES_FindPart(PTHEME_CLASS tc, int iPartId); +PTHEME_PARTSTATE MSSTYLES_FindPartState(PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext); +PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId); +PTHEME_PROPERTY MSSTYLES_FindMetric(int iPropertyPrimitive, int iPropertyId); +HBITMAP MSSTYLES_LoadBitmap(PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha); + +HRESULT MSSTYLES_GetPropertyBool(PTHEME_PROPERTY tp, BOOL *pfVal); +HRESULT MSSTYLES_GetPropertyColor(PTHEME_PROPERTY tp, COLORREF *pColor); +HRESULT MSSTYLES_GetPropertyFont(PTHEME_PROPERTY tp, HDC hdc, LOGFONTW *pFont); +HRESULT MSSTYLES_GetPropertyInt(PTHEME_PROPERTY tp, int *piVal); +HRESULT MSSTYLES_GetPropertyIntList(PTHEME_PROPERTY tp, INTLIST *pIntList); +HRESULT MSSTYLES_GetPropertyPosition(PTHEME_PROPERTY tp, POINT *pPoint); +HRESULT MSSTYLES_GetPropertyString(PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars); +HRESULT MSSTYLES_GetPropertyRect(PTHEME_PROPERTY tp, RECT *pRect); +HRESULT MSSTYLES_GetPropertyMargins(PTHEME_PROPERTY tp, RECT *prc, MARGINS *pMargins); + +PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName); +void UXINI_CloseINI(PUXINI_FILE uf); +LPCWSTR UXINI_GetNextSection(PUXINI_FILE uf, DWORD *dwLen); +BOOL UXINI_FindSection(PUXINI_FILE uf, LPCWSTR lpName); +LPCWSTR UXINI_GetNextValue(PUXINI_FILE uf, DWORD *dwNameLen, LPCWSTR *lpValue, DWORD *dwValueLen); +BOOL UXINI_FindValue(PUXINI_FILE uf, LPCWSTR lpName, LPCWSTR *lpValue, DWORD *dwValueLen); #endif diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 83cbaea5dfa..f95a5d598ae 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -43,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme); static const WCHAR szThemeManager[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\ThemeManager"; -DECLSPEC_HIDDEN ATOM atDialogThemeEnabled; +ATOM atDialogThemeEnabled; static DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS; static ATOM atWindowTheme; diff --git a/dlls/uxtheme/uxthemedll.h b/dlls/uxtheme/uxthemedll.h index 7abc2a58144..aa073cbbb3c 100644 --- a/dlls/uxtheme/uxthemedll.h +++ b/dlls/uxtheme/uxthemedll.h @@ -81,40 +81,40 @@ typedef struct tagTHEMENAMES } THEMENAMES, *PTHEMENAMES; /* Declarations for undocumented functions for use internally */ -DWORD WINAPI QueryThemeServices(void) DECLSPEC_HIDDEN; +DWORD WINAPI QueryThemeServices(void); HRESULT WINAPI OpenThemeFile(LPCWSTR pszThemeFileName, LPCWSTR pszColorName, LPCWSTR pszSizeName, HTHEMEFILE *hThemeFile, - DWORD unknown) DECLSPEC_HIDDEN; -HRESULT WINAPI CloseThemeFile(HTHEMEFILE hThemeFile) DECLSPEC_HIDDEN; -HRESULT WINAPI ApplyTheme(HTHEMEFILE hThemeFile, char *unknown, HWND hWnd) DECLSPEC_HIDDEN; + DWORD unknown); +HRESULT WINAPI CloseThemeFile(HTHEMEFILE hThemeFile); +HRESULT WINAPI ApplyTheme(HTHEMEFILE hThemeFile, char *unknown, HWND hWnd); HRESULT WINAPI GetThemeDefaults(LPCWSTR pszThemeFileName, LPWSTR pszColorName, DWORD dwColorNameLen, LPWSTR pszSizeName, - DWORD dwSizeNameLen) DECLSPEC_HIDDEN; + DWORD dwSizeNameLen); HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, EnumThemeProc callback, - LPVOID lpData) DECLSPEC_HIDDEN; + LPVOID lpData); HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, LPWSTR pszSizeName, - DWORD dwColorNum, PTHEMENAMES pszColorNames) DECLSPEC_HIDDEN; + DWORD dwColorNum, PTHEMENAMES pszColorNames); HRESULT WINAPI EnumThemeSizes(LPWSTR pszThemeFileName, LPWSTR pszColorName, - DWORD dwSizeNum, PTHEMENAMES pszColorNames) DECLSPEC_HIDDEN; + DWORD dwSizeNum, PTHEMENAMES pszColorNames); HRESULT WINAPI ParseThemeIniFile(LPCWSTR pszIniFileName, LPWSTR pszUnknown, - ParseThemeIniFileProc callback, LPVOID lpData) DECLSPEC_HIDDEN; -BOOL WINAPI ThemeHooksInstall(void) DECLSPEC_HIDDEN; -BOOL WINAPI ThemeHooksRemove(void) DECLSPEC_HIDDEN; + ParseThemeIniFileProc callback, LPVOID lpData); +BOOL WINAPI ThemeHooksInstall(void); +BOOL WINAPI ThemeHooksRemove(void); -extern void UXTHEME_InitSystem(HINSTANCE hInst) DECLSPEC_HIDDEN; -extern HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf) DECLSPEC_HIDDEN; -extern void UXTHEME_UninitSystem(void) DECLSPEC_HIDDEN; +extern void UXTHEME_InitSystem(HINSTANCE hInst); +extern HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf); +extern void UXTHEME_UninitSystem(void); -extern struct user_api_hook user_api DECLSPEC_HIDDEN; -LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL unicode) DECLSPEC_HIDDEN; +extern struct user_api_hook user_api; +LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL unicode); void WINAPI UXTHEME_NonClientButtonDraw(HWND hwnd, HDC hdc, enum NONCLIENT_BUTTON_TYPE type, - RECT rect, BOOL down, BOOL grayed) DECLSPEC_HIDDEN; + RECT rect, BOOL down, BOOL grayed); void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTEST hit_test, const struct SCROLL_TRACKING_INFO *tracking_info, BOOL draw_arrows, BOOL draw_interior, RECT *rect, UINT enable_flags, - INT arrowsize, INT thumbpos, INT thumbsize, BOOL vertical) DECLSPEC_HIDDEN; + INT arrowsize, INT thumbpos, INT thumbsize, BOOL vertical); LRESULT WINAPI UXTHEME_ScrollbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, - BOOL unicode) DECLSPEC_HIDDEN; + BOOL unicode); /* No alpha blending */ #define ALPHABLEND_NONE 0
1
0
0
0
Alistair Leslie-Hughes : msacm32: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: 60ee3e2cff8d66cdf21769f8a40ec43610e3de61 URL:
https://gitlab.winehq.org/wine/wine/-/commit/60ee3e2cff8d66cdf21769f8a40ec4…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Nov 9 18:22:39 2023 +1100 msacm32: Remove DECLSPEC_HIDDEN usage. --- dlls/msacm32/wineacm.h | 59 +++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/dlls/msacm32/wineacm.h b/dlls/msacm32/wineacm.h index 98d1ab5a2c8..d6a8112b8ee 100644 --- a/dlls/msacm32/wineacm.h +++ b/dlls/msacm32/wineacm.h @@ -111,43 +111,42 @@ typedef struct _WINE_ACMNOTIFYWND } WINE_ACMNOTIFYWND; /* From internal.c */ -extern HANDLE MSACM_hHeap DECLSPEC_HIDDEN; -extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID DECLSPEC_HIDDEN; +extern HANDLE MSACM_hHeap; +extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID; extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName, - PWINE_ACMLOCALDRIVER pLocalDriver) DECLSPEC_HIDDEN; -extern void MSACM_RegisterAllDrivers(void) DECLSPEC_HIDDEN; -extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p) DECLSPEC_HIDDEN; -extern void MSACM_UnregisterAllDrivers(void) DECLSPEC_HIDDEN; -extern PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID) DECLSPEC_HIDDEN; -extern PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver) DECLSPEC_HIDDEN; -extern PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver) DECLSPEC_HIDDEN; -extern PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type) DECLSPEC_HIDDEN; - -extern MMRESULT MSACM_Message(HACMDRIVER, UINT, LPARAM, LPARAM) DECLSPEC_HIDDEN; -extern BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID*, DWORD, LPDWORD) DECLSPEC_HIDDEN; - -extern void MSACM_RePositionDriver(PWINE_ACMDRIVERID, DWORD) DECLSPEC_HIDDEN; -extern void MSACM_WriteCurrentPriorities(void) DECLSPEC_HIDDEN; -extern void MSACM_BroadcastNotification(void) DECLSPEC_HIDDEN; -extern void MSACM_DisableNotifications(void) DECLSPEC_HIDDEN; -extern void MSACM_EnableNotifications(void) DECLSPEC_HIDDEN; -extern PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg) DECLSPEC_HIDDEN; -extern PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND*) DECLSPEC_HIDDEN; - -extern PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry) DECLSPEC_HIDDEN; - -extern PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc) DECLSPEC_HIDDEN; -extern PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER, LPARAM) DECLSPEC_HIDDEN; -extern LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST) DECLSPEC_HIDDEN; + PWINE_ACMLOCALDRIVER pLocalDriver); +extern void MSACM_RegisterAllDrivers(void); +extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p); +extern void MSACM_UnregisterAllDrivers(void); +extern PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID); +extern PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver); +extern PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver); +extern PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type); + +extern MMRESULT MSACM_Message(HACMDRIVER, UINT, LPARAM, LPARAM); +extern BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID*, DWORD, LPDWORD); + +extern void MSACM_RePositionDriver(PWINE_ACMDRIVERID, DWORD); +extern void MSACM_WriteCurrentPriorities(void); +extern void MSACM_BroadcastNotification(void); +extern void MSACM_DisableNotifications(void); +extern void MSACM_EnableNotifications(void); +extern PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg); +extern PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND*); + +extern PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry); + +extern PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc); +extern PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER, LPARAM); +extern LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST); /* extern PWINE_ACMLOCALDRIVER MSACM_GetLocalDriver(HACMDRIVER hDriver); */ /* From msacm32.c */ -extern HINSTANCE MSACM_hInstance32 DECLSPEC_HIDDEN; +extern HINSTANCE MSACM_hInstance32; /* From pcmcnvtr.c */ -LRESULT CALLBACK PCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, - LPARAM dwParam1, LPARAM dwParam2) DECLSPEC_HIDDEN; +LRESULT CALLBACK PCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, LPARAM dwParam1, LPARAM dwParam2); /* Dialog box templates */ #include "msacmdlg.h"
1
0
0
0
Alistair Leslie-Hughes : comdlg32: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: 6fd308cd980535ac1c40062c0cc03a8d1a7ce273 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6fd308cd980535ac1c40062c0cc03a…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Nov 9 18:23:47 2023 +1100 comdlg32: Remove DECLSPEC_HIDDEN usage. --- dlls/comdlg32/cdlg.h | 24 ++++++++++++------------ dlls/comdlg32/cdlg32.c | 2 +- dlls/comdlg32/filedlgbrowser.h | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dlls/comdlg32/cdlg.h b/dlls/comdlg32/cdlg.h index ae3c3d1ef37..16c3a15ab45 100644 --- a/dlls/comdlg32/cdlg.h +++ b/dlls/comdlg32/cdlg.h @@ -26,11 +26,11 @@ /* Common dialogs implementation globals */ #define COMDLG32_Atom MAKEINTATOM(0xa000) /* MS uses this one to identify props */ -extern HINSTANCE COMDLG32_hInstance DECLSPEC_HIDDEN; -extern HANDLE COMDLG32_hActCtx DECLSPEC_HIDDEN; +extern HINSTANCE COMDLG32_hInstance; +extern HANDLE COMDLG32_hActCtx; -void COMDLG32_SetCommDlgExtendedError(DWORD err) DECLSPEC_HIDDEN; -LPVOID COMDLG32_AllocMem(int size) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN; +void COMDLG32_SetCommDlgExtendedError(DWORD err); +LPVOID COMDLG32_AllocMem(int size) __WINE_ALLOC_SIZE(1); /* Find/Replace local definitions */ @@ -170,18 +170,18 @@ typedef struct { #include "shellapi.h" /* Constructors */ -HRESULT FileOpenDialog_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) DECLSPEC_HIDDEN; -HRESULT FileSaveDialog_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) DECLSPEC_HIDDEN; +HRESULT FileOpenDialog_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv); +HRESULT FileSaveDialog_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv); /* Shared helper functions */ -void COMDLG32_GetCanonicalPath(PCIDLIST_ABSOLUTE pidlAbsCurrent, LPWSTR lpstrFile, LPWSTR lpstrPathAndFile) DECLSPEC_HIDDEN; +void COMDLG32_GetCanonicalPath(PCIDLIST_ABSOLUTE pidlAbsCurrent, LPWSTR lpstrFile, LPWSTR lpstrPathAndFile); int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile, IShellFolder **ppsf, - HWND hwnd, DWORD flags, BOOL isSaveDlg, int defAction) DECLSPEC_HIDDEN; -int COMDLG32_SplitFileNames(LPWSTR lpstrEdit, UINT nStrLen, LPWSTR *lpstrFileList, UINT *sizeUsed) DECLSPEC_HIDDEN; -void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText) DECLSPEC_HIDDEN; + HWND hwnd, DWORD flags, BOOL isSaveDlg, int defAction); +int COMDLG32_SplitFileNames(LPWSTR lpstrEdit, UINT nStrLen, LPWSTR *lpstrFileList, UINT *sizeUsed); +void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText); -extern BOOL GetFileName31A( OPENFILENAMEA *lpofn, UINT dlgType ) DECLSPEC_HIDDEN; -extern BOOL GetFileName31W( OPENFILENAMEW *lpofn, UINT dlgType ) DECLSPEC_HIDDEN; +extern BOOL GetFileName31A( OPENFILENAMEA *lpofn, UINT dlgType ); +extern BOOL GetFileName31W( OPENFILENAMEW *lpofn, UINT dlgType ); #define ONOPEN_BROWSE 1 #define ONOPEN_OPEN 2 diff --git a/dlls/comdlg32/cdlg32.c b/dlls/comdlg32/cdlg32.c index 9163930907a..6432b4c7442 100644 --- a/dlls/comdlg32/cdlg32.c +++ b/dlls/comdlg32/cdlg32.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg); #include "cdlg.h" -DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance = 0; +HINSTANCE COMDLG32_hInstance = 0; HANDLE COMDLG32_hActCtx = INVALID_HANDLE_VALUE; static DWORD COMDLG32_TlsIndex = TLS_OUT_OF_INDEXES; diff --git a/dlls/comdlg32/filedlgbrowser.h b/dlls/comdlg32/filedlgbrowser.h index 21eb3d56dfe..57c8911fbd1 100644 --- a/dlls/comdlg32/filedlgbrowser.h +++ b/dlls/comdlg32/filedlgbrowser.h @@ -138,23 +138,23 @@ typedef struct * Prototypes for the methods of the IShellBrowserImpl class */ /* Constructor */ -IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner) DECLSPEC_HIDDEN; +IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner); -LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) DECLSPEC_HIDDEN; +LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex); /* Functions used by the EDIT box */ -void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd) DECLSPEC_HIDDEN; +void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd); /************************************************************************** * External Prototypes */ -extern FileOpenDlgInfos *get_filedlg_infoptr(HWND hwnd) DECLSPEC_HIDDEN; +extern FileOpenDlgInfos *get_filedlg_infoptr(HWND hwnd); -extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs) DECLSPEC_HIDDEN; -extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl) DECLSPEC_HIDDEN; +extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs); +extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl); -extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl) DECLSPEC_HIDDEN; -extern LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) DECLSPEC_HIDDEN; +extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl); +extern LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode); #endif /*SHBROWSER_H*/
1
0
0
0
Anton Baskanov : dmsynth: Don't leak modulators.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: dbda5b52d38a507d90e86cf2f204fa7f4391948c URL:
https://gitlab.winehq.org/wine/wine/-/commit/dbda5b52d38a507d90e86cf2f204fa…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Wed Nov 8 15:36:47 2023 +0700 dmsynth: Don't leak modulators. --- dlls/dmsynth/synth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index b3c624b5b6b..410fb59089e 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -1607,6 +1607,7 @@ static void add_mod_from_connection(fluid_voice_t *fluid_voice, const CONNECTION fluid_mod_set_amount(mod, value); fluid_voice_add_mod(fluid_voice, mod, FLUID_VOICE_OVERWRITE); + delete_fluid_mod(mod); } static void add_voice_connections(fluid_voice_t *fluid_voice, const CONNECTIONLIST *list,
1
0
0
0
Anton Baskanov : dmsynth: Free the allocated presets manually.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: 157ffca64df4eb50f7444ba644467f9f62ddba4b URL:
https://gitlab.winehq.org/wine/wine/-/commit/157ffca64df4eb50f7444ba644467f…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Wed Nov 8 14:43:09 2023 +0700 dmsynth: Free the allocated presets manually. FluidSynth never calls synth_preset_free(), causing preset and instrument leaks. --- dlls/dmsynth/synth.c | 69 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 11 deletions(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 6d747980cbd..b3c624b5b6b 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -319,6 +319,17 @@ static void instrument_release(struct instrument *instrument) } } +struct preset +{ + struct list entry; + int bank; + int patch; + + fluid_preset_t *fluid_preset; + + struct instrument *instrument; +}; + struct event { struct list entry; @@ -350,6 +361,7 @@ struct synth struct list waves; struct list events; struct list voices; + struct list presets; fluid_settings_t *fluid_settings; fluid_sfont_t *fluid_sfont; @@ -598,6 +610,7 @@ static HRESULT WINAPI synth_Open(IDirectMusicSynth8 *iface, DMUS_PORTPARAMS *par static HRESULT WINAPI synth_Close(IDirectMusicSynth8 *iface) { struct synth *This = impl_from_IDirectMusicSynth8(iface); + struct preset *preset; struct voice *voice; void *next; @@ -621,6 +634,14 @@ static HRESULT WINAPI synth_Close(IDirectMusicSynth8 *iface) free(voice); } + LIST_FOR_EACH_ENTRY_SAFE(preset, next, &This->presets, struct preset, entry) + { + list_remove(&preset->entry); + instrument_release(preset->instrument); + delete_fluid_preset(preset->fluid_preset); + free(preset); + } + This->open = FALSE; LeaveCriticalSection(&This->cs); @@ -1394,11 +1415,11 @@ static int synth_preset_get_bank(fluid_preset_t *fluid_preset) static int synth_preset_get_num(fluid_preset_t *fluid_preset) { - struct instrument *instrument = fluid_preset_get_data(fluid_preset); + struct preset *preset = fluid_preset_get_data(fluid_preset); TRACE("(%p)\n", fluid_preset); - return instrument->patch; + return preset->patch; } static BOOL gen_from_connection(const CONNECTION *conn, UINT *gen) @@ -1760,7 +1781,8 @@ static void set_default_voice_connections(fluid_voice_t *fluid_voice) static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *fluid_synth, int chan, int key, int vel) { - struct instrument *instrument = fluid_preset_get_data(fluid_preset); + struct preset *preset = fluid_preset_get_data(fluid_preset); + struct instrument *instrument = preset->instrument; struct synth *synth = instrument->synth; fluid_voice_t *fluid_voice; struct region *region; @@ -1836,9 +1858,6 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui static void synth_preset_free(fluid_preset_t *fluid_preset) { - struct instrument *instrument = fluid_preset_get_data(fluid_preset); - fluid_preset_set_data(fluid_preset, NULL); - if (instrument) instrument_release(instrument); } static const char *synth_sfont_get_name(fluid_sfont_t *fluid_sfont) @@ -1851,11 +1870,21 @@ static fluid_preset_t *synth_sfont_get_preset(fluid_sfont_t *fluid_sfont, int ba struct synth *synth = fluid_sfont_get_data(fluid_sfont); struct instrument *instrument; fluid_preset_t *fluid_preset; + struct preset *preset; TRACE("(%p, %d, %d)\n", fluid_sfont, bank, patch); EnterCriticalSection(&synth->cs); + LIST_FOR_EACH_ENTRY(preset, &synth->presets, struct preset, entry) + { + if (preset->bank == bank && preset->patch == patch) + { + LeaveCriticalSection(&synth->cs); + return preset->fluid_preset; + } + } + LIST_FOR_EACH_ENTRY(instrument, &synth->instruments, struct instrument, entry) { if (bank == 128 && instrument->patch == (0x80000000 | patch)) break; @@ -1864,18 +1893,35 @@ static fluid_preset_t *synth_sfont_get_preset(fluid_sfont_t *fluid_sfont, int ba if (&instrument->entry == &synth->instruments) { - fluid_preset = NULL; WARN("Could not find instrument with patch %#x\n", patch); + LeaveCriticalSection(&synth->cs); + return NULL; } - else if ((fluid_preset = new_fluid_preset(fluid_sfont, synth_preset_get_name, synth_preset_get_bank, + + if (!(fluid_preset = new_fluid_preset(fluid_sfont, synth_preset_get_name, synth_preset_get_bank, synth_preset_get_num, synth_preset_noteon, synth_preset_free))) { - fluid_preset_set_data(fluid_preset, instrument); - instrument_addref(instrument); + LeaveCriticalSection(&synth->cs); + return NULL; + } - TRACE("Created fluid_preset %p for instrument %p\n", fluid_preset, instrument); + if (!(preset = calloc(1, sizeof(struct preset)))) + { + delete_fluid_preset(fluid_preset); + LeaveCriticalSection(&synth->cs); + return NULL; } + preset->bank = bank; + preset->patch = patch; + preset->fluid_preset = fluid_preset; + preset->instrument = instrument; + fluid_preset_set_data(fluid_preset, preset); + instrument_addref(instrument); + list_add_tail(&synth->presets, &preset->entry); + + TRACE("Created fluid_preset %p for instrument %p\n", fluid_preset, instrument); + LeaveCriticalSection(&synth->cs); return fluid_preset; @@ -1925,6 +1971,7 @@ HRESULT synth_create(IUnknown **ret_iface) list_init(&obj->waves); list_init(&obj->events); list_init(&obj->voices); + list_init(&obj->presets); if (!(obj->fluid_settings = new_fluid_settings())) goto failed; if (!(obj->fluid_sfont = new_fluid_sfont(synth_sfont_get_name, synth_sfont_get_preset,
1
0
0
0
Anton Baskanov : dmsynth: Remove useless private data checks.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: ed7564304d4bfef9fb53d421ab0ca363881c36cc URL:
https://gitlab.winehq.org/wine/wine/-/commit/ed7564304d4bfef9fb53d421ab0ca3…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Wed Nov 8 17:20:29 2023 +0700 dmsynth: Remove useless private data checks. We always set the data. --- dlls/dmsynth/synth.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index f936d51e02e..6d747980cbd 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -1398,7 +1398,6 @@ static int synth_preset_get_num(fluid_preset_t *fluid_preset) TRACE("(%p)\n", fluid_preset); - if (!instrument) return 0; return instrument->patch; } @@ -1768,8 +1767,6 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui TRACE("(%p, %p, %u, %u, %u)\n", fluid_preset, fluid_synth, chan, key, vel); - if (!instrument) return FLUID_FAILED; - LIST_FOR_EACH_ENTRY(region, &instrument->regions, struct region, entry) { struct articulation *articulation; @@ -1857,8 +1854,6 @@ static fluid_preset_t *synth_sfont_get_preset(fluid_sfont_t *fluid_sfont, int ba TRACE("(%p, %d, %d)\n", fluid_sfont, bank, patch); - if (!synth) return NULL; - EnterCriticalSection(&synth->cs); LIST_FOR_EACH_ENTRY(instrument, &synth->instruments, struct instrument, entry)
1
0
0
0
Anton Baskanov : dmsynth: Create one FluidSynth sample per wave.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: 6de4ec0cae0330c2a32dca383a3be2892a2057b5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6de4ec0cae0330c2a32dca383a3be2…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Mon Nov 6 15:33:01 2023 +0700 dmsynth: Create one FluidSynth sample per wave. --- dlls/dmsynth/synth.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 556947fc30a..f936d51e02e 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -209,6 +209,8 @@ struct wave LONG ref; UINT id; + fluid_sample_t *fluid_sample; + WAVEFORMATEX format; UINT sample_count; short samples[]; @@ -224,7 +226,11 @@ static void wave_addref(struct wave *wave) static void wave_release(struct wave *wave) { ULONG ref = InterlockedDecrement(&wave->ref); - if (!ref) free(wave); + if (!ref) + { + delete_fluid_sample(wave->fluid_sample); + free(wave); + } } struct articulation @@ -825,6 +831,16 @@ static HRESULT synth_download_wave(struct synth *This, DMUS_DOWNLOADINFO *info, } } + if (!(wave->fluid_sample = new_fluid_sample())) + { + WARN("Failed to allocate FluidSynth sample\n"); + free(wave); + return FLUID_FAILED; + } + + fluid_sample_set_sound_data(wave->fluid_sample, wave->samples, NULL, wave->sample_count, + wave->format.nSamplesPerSec, TRUE); + EnterCriticalSection(&This->cs); list_add_tail(&This->waves, &wave->entry); LeaveCriticalSection(&This->cs); @@ -1747,7 +1763,6 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui { struct instrument *instrument = fluid_preset_get_data(fluid_preset); struct synth *synth = instrument->synth; - fluid_sample_t *fluid_sample; fluid_voice_t *fluid_voice; struct region *region; @@ -1764,19 +1779,9 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui if (key < region->key_range.usLow || key > region->key_range.usHigh) continue; if (vel < region->vel_range.usLow || vel > region->vel_range.usHigh) continue; - if (!(fluid_sample = new_fluid_sample())) - { - WARN("Failed to allocate FluidSynth sample\n"); - return FLUID_FAILED; - } - - fluid_sample_set_sound_data(fluid_sample, wave->samples, NULL, wave->sample_count, - wave->format.nSamplesPerSec, TRUE); - - if (!(fluid_voice = fluid_synth_alloc_voice(synth->fluid_synth, fluid_sample, chan, key, vel))) + if (!(fluid_voice = fluid_synth_alloc_voice(synth->fluid_synth, wave->fluid_sample, chan, key, vel))) { WARN("Failed to allocate FluidSynth voice\n"); - delete_fluid_sample(fluid_sample); return FLUID_FAILED; } @@ -1792,10 +1797,7 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui if (&voice->entry == &synth->voices) { if (!(voice = calloc(1, sizeof(struct voice)))) - { - delete_fluid_sample(fluid_sample); return FLUID_FAILED; - } voice->fluid_voice = fluid_voice; list_add_tail(&synth->voices, &voice->entry); }
1
0
0
0
Anton Baskanov : dmsynth: Use generators to set root key and fine tune.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: 840923eed6ce0051bd0f411b5e7aa0ed56cafb1e URL:
https://gitlab.winehq.org/wine/wine/-/commit/840923eed6ce0051bd0f411b5e7aa0…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Mon Nov 6 15:02:39 2023 +0700 dmsynth: Use generators to set root key and fine tune. --- dlls/dmsynth/synth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index aee76af5302..556947fc30a 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -1739,7 +1739,6 @@ static void set_default_voice_connections(fluid_voice_t *fluid_voice) fluid_voice_gen_set(fluid_voice, GEN_KEYNUM, -1.); fluid_voice_gen_set(fluid_voice, GEN_VELOCITY, -1.); fluid_voice_gen_set(fluid_voice, GEN_SCALETUNE, 100.0); - fluid_voice_gen_set(fluid_voice, GEN_OVERRIDEROOTKEY, -1.); add_voice_connections(fluid_voice, &list, connections); } @@ -1773,7 +1772,6 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui fluid_sample_set_sound_data(fluid_sample, wave->samples, NULL, wave->sample_count, wave->format.nSamplesPerSec, TRUE); - fluid_sample_set_pitch(fluid_sample, region->wave_sample.usUnityNote, region->wave_sample.sFineTune); if (!(fluid_voice = fluid_synth_alloc_voice(synth->fluid_synth, fluid_sample, chan, key, vel))) { @@ -1823,6 +1821,8 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui fluid_voice_gen_set(fluid_voice, GEN_STARTLOOPADDROFS, 8 + loop->ulStart); fluid_voice_gen_set(fluid_voice, GEN_ENDLOOPADDROFS, 8 + loop->ulStart + loop->ulLength); } + fluid_voice_gen_set(fluid_voice, GEN_OVERRIDEROOTKEY, region->wave_sample.usUnityNote); + fluid_voice_gen_set(fluid_voice, GEN_FINETUNE, region->wave_sample.sFineTune); LIST_FOR_EACH_ENTRY(articulation, &instrument->articulations, struct articulation, entry) add_voice_connections(fluid_voice, &articulation->list, articulation->connections); LIST_FOR_EACH_ENTRY(articulation, ®ion->articulations, struct articulation, entry)
1
0
0
0
Anton Baskanov : dmsynth: Keep track of voice/wave mapping.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: a303bb395fa3c6e73d06bbf5e0403e849ac97b67 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a303bb395fa3c6e73d06bbf5e0403e…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Mon Nov 6 14:11:43 2023 +0700 dmsynth: Keep track of voice/wave mapping. --- dlls/dmsynth/synth.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index a4196f29a8a..aee76af5302 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -320,6 +320,13 @@ struct event BYTE midi[3]; }; +struct voice +{ + struct list entry; + fluid_voice_t *fluid_voice; + struct wave *wave; +}; + struct synth { IDirectMusicSynth8 IDirectMusicSynth8_iface; @@ -336,6 +343,7 @@ struct synth struct list instruments; struct list waves; struct list events; + struct list voices; fluid_settings_t *fluid_settings; fluid_sfont_t *fluid_sfont; @@ -584,6 +592,8 @@ static HRESULT WINAPI synth_Open(IDirectMusicSynth8 *iface, DMUS_PORTPARAMS *par static HRESULT WINAPI synth_Close(IDirectMusicSynth8 *iface) { struct synth *This = impl_from_IDirectMusicSynth8(iface); + struct voice *voice; + void *next; TRACE("(%p)\n", This); @@ -597,6 +607,14 @@ static HRESULT WINAPI synth_Close(IDirectMusicSynth8 *iface) fluid_synth_remove_sfont(This->fluid_synth, This->fluid_sfont); delete_fluid_synth(This->fluid_synth); This->fluid_synth = NULL; + + LIST_FOR_EACH_ENTRY_SAFE(voice, next, &This->voices, struct voice, entry) + { + list_remove(&voice->entry); + wave_release(voice->wave); + free(voice); + } + This->open = FALSE; LeaveCriticalSection(&This->cs); @@ -1742,6 +1760,7 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui { struct articulation *articulation; struct wave *wave = region->wave; + struct voice *voice; if (key < region->key_range.usLow || key > region->key_range.usHigh) continue; if (vel < region->vel_range.usLow || vel > region->vel_range.usHigh) continue; @@ -1763,6 +1782,29 @@ static int synth_preset_noteon(fluid_preset_t *fluid_preset, fluid_synth_t *flui return FLUID_FAILED; } + LIST_FOR_EACH_ENTRY(voice, &synth->voices, struct voice, entry) + { + if (voice->fluid_voice == fluid_voice) + { + wave_release(voice->wave); + break; + } + } + + if (&voice->entry == &synth->voices) + { + if (!(voice = calloc(1, sizeof(struct voice)))) + { + delete_fluid_sample(fluid_sample); + return FLUID_FAILED; + } + voice->fluid_voice = fluid_voice; + list_add_tail(&synth->voices, &voice->entry); + } + + voice->wave = wave; + wave_addref(voice->wave); + set_default_voice_connections(fluid_voice); if (region->wave_sample.cSampleLoops) { @@ -1885,6 +1927,7 @@ HRESULT synth_create(IUnknown **ret_iface) list_init(&obj->instruments); list_init(&obj->waves); list_init(&obj->events); + list_init(&obj->voices); if (!(obj->fluid_settings = new_fluid_settings())) goto failed; if (!(obj->fluid_sfont = new_fluid_sfont(synth_sfont_get_name, synth_sfont_get_preset,
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
99
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Results per page:
10
25
50
100
200