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 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
775 discussions
Start a n
N
ew thread
Piotr Caban : wineps: Remove unused fields from PSFONT structure.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: 96a6d1fd278df481c61da5255770f0bc7a3f92d2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/96a6d1fd278df481c61da5255770f0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat May 6 12:30:14 2023 +0200 wineps: Remove unused fields from PSFONT structure. --- dlls/wineps.drv/builtin.c | 5 ----- dlls/wineps.drv/download.c | 5 ----- dlls/wineps.drv/psdrv.h | 5 ----- dlls/wineps.drv/unixlib.c | 5 ----- 4 files changed, 20 deletions(-) diff --git a/dlls/wineps.drv/builtin.c b/dlls/wineps.drv/builtin.c index 4fdbc58f099..f4be5eb37fb 100644 --- a/dlls/wineps.drv/builtin.c +++ b/dlls/wineps.drv/builtin.c @@ -138,11 +138,6 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font, tm->tmMaxCharWidth = (LONG)Round( (afm->FontBBox.urx - afm->FontBBox.llx) * font->fontinfo.Builtin.scale); - font->underlinePosition = afm->UnderlinePosition * font->fontinfo.Builtin.scale; - font->underlineThickness = afm->UnderlineThickness * font->fontinfo.Builtin.scale; - font->strikeoutPosition = tm->tmAscent / 2; - font->strikeoutThickness = font->underlineThickness; - TRACE("Selected PS font '%s' size %d weight %ld.\n", afm->FontName, font->size.xx, tm->tmWeight ); TRACE("H = %ld As = %ld Des = %ld IL = %ld EL = %ld\n", tm->tmHeight, diff --git a/dlls/wineps.drv/download.c b/dlls/wineps.drv/download.c index e8c3299e17c..191f8703e61 100644 --- a/dlls/wineps.drv/download.c +++ b/dlls/wineps.drv/download.c @@ -308,11 +308,6 @@ BOOL PSDRV_WriteSetDownloadFont(PHYSDEV dev, BOOL vertical) physDev->font.size.yx = -ps_round(ppem * xform.eM21); physDev->font.size.yy = -ps_round(ppem * xform.eM22); - physDev->font.underlineThickness = potm->otmsUnderscoreSize; - physDev->font.underlinePosition = potm->otmsUnderscorePosition; - physDev->font.strikeoutThickness = potm->otmsStrikeoutSize; - physDev->font.strikeoutPosition = potm->otmsStrikeoutPosition; - if(physDev->font.fontinfo.Download == NULL) { RECT bbox; UINT emsize = get_bbox(dev->hdc, &bbox); diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index 40f590d0afd..3e6952f9618 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -316,11 +316,6 @@ typedef struct { /* These are needed by PSDRV_ExtTextOut */ int escapement; - int underlineThickness; - int underlinePosition; - int strikeoutThickness; - int strikeoutPosition; - } PSFONT; typedef struct { diff --git a/dlls/wineps.drv/unixlib.c b/dlls/wineps.drv/unixlib.c index 36971f65495..73181d9cd93 100644 --- a/dlls/wineps.drv/unixlib.c +++ b/dlls/wineps.drv/unixlib.c @@ -904,11 +904,6 @@ static void scale_font(const AFM *afm, LONG height, PSFONT *font, TEXTMETRICW *t tm->tmMaxCharWidth = (LONG)gdi_round( (afm->FontBBox.urx - afm->FontBBox.llx) * font->fontinfo.Builtin.scale); - font->underlinePosition = afm->UnderlinePosition * font->fontinfo.Builtin.scale; - font->underlineThickness = afm->UnderlineThickness * font->fontinfo.Builtin.scale; - font->strikeoutPosition = tm->tmAscent / 2; - font->strikeoutThickness = font->underlineThickness; - TRACE("Selected PS font '%s' size %d weight %d.\n", afm->FontName, font->size.xx, (int)tm->tmWeight); TRACE("H = %d As = %d Des = %d IL = %d EL = %d\n", (int)tm->tmHeight,
1
0
0
0
Piotr Caban : wineps: Introduce PSDRV_GET_GLYPH_NAME escape to obtain builtin glyph name from unixlib.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: d1b09fa24c1d5007af91a1a9d5ea8a617da37683 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d1b09fa24c1d5007af91a1a9d5ea8a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat May 6 12:24:01 2023 +0200 wineps: Introduce PSDRV_GET_GLYPH_NAME escape to obtain builtin glyph name from unixlib. --- dlls/wineps.drv/builtin.c | 7 +++-- dlls/wineps.drv/unixlib.c | 67 +++++++++++++++++++++++++++-------------------- dlls/wineps.drv/unixlib.h | 2 ++ 3 files changed, 44 insertions(+), 32 deletions(-) diff --git a/dlls/wineps.drv/builtin.c b/dlls/wineps.drv/builtin.c index 74ffda36f92..4fdbc58f099 100644 --- a/dlls/wineps.drv/builtin.c +++ b/dlls/wineps.drv/builtin.c @@ -31,6 +31,7 @@ #include "winternl.h" #include "psdrv.h" +#include "unixlib.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(psdrv); @@ -244,14 +245,12 @@ BOOL PSDRV_WriteSetBuiltinFont(PHYSDEV dev) BOOL PSDRV_WriteBuiltinGlyphShow(PHYSDEV dev, LPCWSTR str, INT count) { - PSDRV_PDEVICE *physDev = get_psdrv_dev( dev ); + char name[32]; int i; - LPCSTR name; for (i = 0; i < count; ++i) { - name = PSDRV_UVMetrics(str[i], physDev->font.fontinfo.Builtin.afm)->N->sz; - + ExtEscape(dev->hdc, PSDRV_GET_GLYPH_NAME, sizeof(str[i]), (const char *)&str[i], sizeof(name), name); PSDRV_WriteGlyphShow(dev, name); } diff --git a/dlls/wineps.drv/unixlib.c b/dlls/wineps.drv/unixlib.c index 72f63c81300..36971f65495 100644 --- a/dlls/wineps.drv/unixlib.c +++ b/dlls/wineps.drv/unixlib.c @@ -518,6 +518,34 @@ static BOOL CDECL reset_dc(PHYSDEV dev, const DEVMODEW *devmode) return TRUE; } +static int metrics_by_uv(const void *a, const void *b) +{ + return (int)(((const AFMMETRICS *)a)->UV - ((const AFMMETRICS *)b)->UV); +} + +const AFMMETRICS *uv_metrics(LONG uv, const AFM *afm) +{ + const AFMMETRICS *needle; + AFMMETRICS key; + + /* + * Ugly work-around for symbol fonts. Wine is sending characters which + * belong in the Unicode private use range (U+F020 - U+F0FF) as ASCII + * characters (U+0020 - U+00FF). + */ + if ((afm->Metrics->UV & 0xff00) == 0xf000 && uv < 0x100) + uv |= 0xf000; + + key.UV = uv; + needle = bsearch(&key, afm->Metrics, afm->NumofMetrics, sizeof(AFMMETRICS), metrics_by_uv); + if (!needle) + { + WARN("No glyph for U+%.4X in '%s'\n", (int)uv, afm->FontName); + needle = afm->Metrics; + } + return needle; +} + static int CDECL ext_escape(PHYSDEV dev, int escape, int input_size, const void *input, int output_size, void *output) { @@ -770,6 +798,17 @@ static int CDECL ext_escape(PHYSDEV dev, int escape, int input_size, const void case CLIP_TO_PATH: return 1; + + case PSDRV_GET_GLYPH_NAME: + { + PSDRV_PDEVICE *pdev = get_psdrv_dev(dev); + WCHAR *uv = (WCHAR *)input; + const char *name = uv_metrics(*uv, pdev->font.fontinfo.Builtin.afm)->N->sz; + + lstrcpynA(output, name, output_size); + return 1; + } + default: FIXME("Unimplemented code %d\n", escape); return 0; @@ -1135,34 +1174,6 @@ static BOOL CDECL enum_fonts(PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LP return ret; } -static int metrics_by_uv(const void *a, const void *b) -{ - return (int)(((const AFMMETRICS *)a)->UV - ((const AFMMETRICS *)b)->UV); -} - -const AFMMETRICS *uv_metrics(LONG uv, const AFM *afm) -{ - const AFMMETRICS *needle; - AFMMETRICS key; - - /* - * Ugly work-around for symbol fonts. Wine is sending characters which - * belong in the Unicode private use range (U+F020 - U+F0FF) as ASCII - * characters (U+0020 - U+00FF). - */ - if ((afm->Metrics->UV & 0xff00) == 0xf000 && uv < 0x100) - uv |= 0xf000; - - key.UV = uv; - needle = bsearch(&key, afm->Metrics, afm->NumofMetrics, sizeof(AFMMETRICS), metrics_by_uv); - if (!needle) - { - WARN("No glyph for U+%.4X in '%s'\n", (int)uv, afm->FontName); - needle = afm->Metrics; - } - return needle; -} - static BOOL CDECL get_char_width(PHYSDEV dev, UINT first, UINT count, const WCHAR *chars, INT *buffer) { PSDRV_PDEVICE *pdev = get_psdrv_dev(dev); diff --git a/dlls/wineps.drv/unixlib.h b/dlls/wineps.drv/unixlib.h index 95efdd4c310..eb82188807c 100644 --- a/dlls/wineps.drv/unixlib.h +++ b/dlls/wineps.drv/unixlib.h @@ -19,6 +19,8 @@ #include "ntuser.h" #include "wine/unixlib.h" +#define PSDRV_GET_GLYPH_NAME 0x10000 + enum wineps_funcs { unix_init_dc,
1
0
0
0
Piotr Caban : wineps: Change initial printer font to DEVICE_DEFAULT_FONT.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: 9e95b9e6fc16312996bde48cfcbf013fedcd8e2e URL:
https://gitlab.winehq.org/wine/wine/-/commit/9e95b9e6fc16312996bde48cfcbf01…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat May 6 11:24:11 2023 +0200 wineps: Change initial printer font to DEVICE_DEFAULT_FONT. --- dlls/wineps.drv/init.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index b08f02ddb11..97f68d19a91 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -93,12 +93,6 @@ static const PSDRV_DEVMODE DefaultDevmode = HINSTANCE PSDRV_hInstance = 0; HANDLE PSDRV_Heap = 0; -static HFONT PSDRV_DefaultFont = 0; -static const LOGFONTA DefaultLogFont = { - 100, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, - DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "" -}; - static struct gdi_dc_funcs psdrv_funcs; /********************************************************************* @@ -134,18 +128,11 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) HeapDestroy(PSDRV_Heap); return FALSE; } - - PSDRV_DefaultFont = CreateFontIndirectA(&DefaultLogFont); - if (PSDRV_DefaultFont == NULL) { - HeapDestroy(PSDRV_Heap); - return FALSE; - } break; } case DLL_PROCESS_DETACH: if (reserved) break; - DeleteObject( PSDRV_DefaultFont ); HeapDestroy( PSDRV_Heap ); break; } @@ -391,7 +378,7 @@ PSDRV_PDEVICE *create_psdrv_physdev( HDC hdc, const WCHAR *device, } PSDRV_UpdateDevCaps( pdev ); - SelectObject( hdc, PSDRV_DefaultFont ); + SelectObject( hdc, GetStockObject( DEVICE_DEFAULT_FONT )); return pdev; }
1
0
0
0
Paul Gofman : ntdll: Retry send on ECONNREFUSED in try_send().
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: afaf6786153ced082412b63caf14adc73c6154fb URL:
https://gitlab.winehq.org/wine/wine/-/commit/afaf6786153ced082412b63caf14ad…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Apr 20 19:32:18 2023 -0600 ntdll: Retry send on ECONNREFUSED in try_send(). --- dlls/ntdll/unix/socket.c | 12 ++++++++++++ dlls/ws2_32/tests/sock.c | 25 ++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index ac351a17a70..4e706323a0a 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -984,6 +984,7 @@ static NTSTATUS try_send( int fd, struct async_send_ioctl *async ) { union unix_sockaddr unix_addr; struct msghdr hdr; + int attempt = 0; ssize_t ret; memset( &hdr, 0, sizeof(hdr) ); @@ -1028,6 +1029,17 @@ static NTSTATUS try_send( int fd, struct async_send_ioctl *async ) else if (errno != EINTR) { if (errno != EWOULDBLOCK) WARN( "sendmsg: %s\n", strerror( errno ) ); + + /* ECONNREFUSED may be returned if this is connected datagram socket and the system received + * ICMP "destination port unreachable" message from the peer. That is ignored + * on Windows. The first sendmsg() will clear the error in this case and the next + * call should succeed. */ + if (!attempt && errno == ECONNREFUSED) + { + ++attempt; + continue; + } + return sock_errno_to_status( errno ); } } diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 1125d4519d3..cddc4c125ff 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2962,7 +2962,9 @@ static void test_UDP(void) /* peer 0 receives data from all other peers */ struct sock_info peer[NUM_UDP_PEERS]; char buf[16]; - int ss, i, n_recv, n_sent; + int ss, i, n_recv, n_sent, ret; + struct sockaddr_in addr; + int sock; memset (buf,0,sizeof(buf)); for ( i = NUM_UDP_PEERS - 1; i >= 0; i-- ) { @@ -3000,6 +3002,27 @@ static void test_UDP(void) ok ( n_recv == sizeof(buf), "UDP: recvfrom() received wrong amount of data or socket error: %d\n", n_recv ); ok ( memcmp ( &peer[0].peer.sin_port, buf, sizeof(peer[0].addr.sin_port) ) == 0, "UDP: port numbers do not match\n" ); } + + sock = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ok( sock != INVALID_SOCKET, "got error %u.\n", WSAGetLastError() ); + + memset( &addr, 0, sizeof(addr) ); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + addr.sin_port = htons(255); + + ret = connect( sock, (struct sockaddr *)&addr, sizeof(addr) ); + ok( !ret, "got error %u.\n", WSAGetLastError() ); + + /* Send to UDP socket succeeds even if the packets are not received and the network is replying with + * "destination port unreachable" ICMP messages. */ + for (i = 0; i < 10; ++i) + { + ret = send( sock, buf, sizeof(buf), 0 ); + ok( ret == sizeof(buf), "got %d, error %u.\n", ret, WSAGetLastError() ); + } + + closesocket(sock); } static void test_WSASocket(void)
1
0
0
0
Eric Pouech : winegstreamer: Fix typo.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: 0e622f64e022e06a925f560796f668c4b64e28e2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0e622f64e022e06a925f560796f668…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Wed May 10 17:16:53 2023 +0200 winegstreamer: Fix typo. Introduced in 98d209752cee9abd8dc31dfe1f28811066b0b83f. An application (Idol Showdown) fails to play its intro video without this change. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/winegstreamer/media_source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index 335b617becd..41271585454 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -947,7 +947,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream) if (FAILED(hr = MFCreateMediaType(&iyuv_type))) goto done; - if (FAILED(hr = IMFMediaType_CopyAllItems(iyuv_type, (IMFAttributes *)iyuv_type))) + if (FAILED(hr = IMFMediaType_CopyAllItems(new_type, (IMFAttributes *)iyuv_type))) goto done; if (FAILED(hr = IMFMediaType_SetGUID(iyuv_type, &MF_MT_SUBTYPE, &MFVideoFormat_IYUV))) goto done;
1
0
0
0
Michael Stefaniuc : wbemprox: Avoid assigning COM objects to interface variables.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: 0542346d3beeed7cf0d0af79e66789dae241daea URL:
https://gitlab.winehq.org/wine/wine/-/commit/0542346d3beeed7cf0d0af79e66789…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue May 9 18:30:42 2023 +0200 wbemprox: Avoid assigning COM objects to interface variables. --- dlls/wbemprox/class.c | 4 ++-- dlls/wbemprox/qualifier.c | 2 +- dlls/wbemprox/services.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index d9848986044..1570a5e534a 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -78,7 +78,7 @@ static HRESULT WINAPI enum_class_object_QueryInterface( if ( IsEqualGUID( riid, &IID_IEnumWbemClassObject ) || IsEqualGUID( riid, &IID_IUnknown ) ) { - *ppvObject = ec; + *ppvObject = &ec->IEnumWbemClassObject_iface; } else if ( IsEqualGUID( riid, &IID_IClientSecurity ) ) { @@ -324,7 +324,7 @@ static HRESULT WINAPI class_object_QueryInterface( if ( IsEqualGUID( riid, &IID_IWbemClassObject ) || IsEqualGUID( riid, &IID_IUnknown ) ) { - *ppvObject = co; + *ppvObject = &co->IWbemClassObject_iface; } else if (IsEqualGUID( riid, &IID_IClientSecurity )) { diff --git a/dlls/wbemprox/qualifier.c b/dlls/wbemprox/qualifier.c index 9a8947ede80..167a8142223 100644 --- a/dlls/wbemprox/qualifier.c +++ b/dlls/wbemprox/qualifier.c @@ -79,7 +79,7 @@ static HRESULT WINAPI qualifier_set_QueryInterface( if ( IsEqualGUID( riid, &IID_IWbemQualifierSet ) || IsEqualGUID( riid, &IID_IUnknown ) ) { - *ppvObject = set; + *ppvObject = &set->IWbemQualifierSet_iface; } else { diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c index 203b0e90784..436097c1e8d 100644 --- a/dlls/wbemprox/services.c +++ b/dlls/wbemprox/services.c @@ -52,7 +52,7 @@ static HRESULT WINAPI client_security_QueryInterface( if ( IsEqualGUID( riid, &IID_IClientSecurity ) || IsEqualGUID( riid, &IID_IUnknown ) ) { - *ppvObject = cs; + *ppvObject = &cs->IClientSecurity_iface; } else { @@ -264,7 +264,7 @@ static HRESULT WINAPI wbem_services_QueryInterface( if ( IsEqualGUID( riid, &IID_IWbemServices ) || IsEqualGUID( riid, &IID_IUnknown ) ) { - *ppvObject = ws; + *ppvObject = &ws->IWbemServices_iface; } else if ( IsEqualGUID( riid, &IID_IClientSecurity ) ) {
1
0
0
0
Paul Gofman : wbemprox: Bump video driver version and date.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: a6344997831f283e92a7e203534f0e3faf3cdb06 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a6344997831f283e92a7e203534f0e…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue May 9 14:07:18 2023 -0600 wbemprox: Bump video driver version and date. --- dlls/wbemprox/builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 7c4e530a6d0..3d5b1df2466 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -4191,8 +4191,8 @@ static enum fill_status fill_videocontroller( struct table *table, const struct rec->current_verticalres = vres; rec->description = wcsdup( name ); rec->device_id = L"VideoController1"; - rec->driverdate = L"20220118000000.000000-000"; - rec->driverversion = L"30.0.14023.3004"; + rec->driverdate = L"20230420000000.000000-000"; + rec->driverversion = L"31.0.14051.5006"; rec->installeddriver = get_videocontroller_installeddriver( desc.VendorId ); rec->name = wcsdup( name ); rec->pnpdevice_id = get_videocontroller_pnpdeviceid( &desc );
1
0
0
0
Davide Beatrici : wineoss: Use mmdevapi's AudioStreamVolume.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: 018516729b8a3cc5959fafb51e4863ea8cc63d8c URL:
https://gitlab.winehq.org/wine/wine/-/commit/018516729b8a3cc5959fafb51e4863…
Author: Davide Beatrici <git(a)davidebeatrici.dev> Date: Tue May 9 21:36:47 2023 +0200 wineoss: Use mmdevapi's AudioStreamVolume. --- dlls/mmdevapi/client.c | 12 +++- dlls/mmdevapi/session.c | 12 +--- dlls/wineoss.drv/Makefile.in | 1 + dlls/wineoss.drv/mmdevdrv.c | 156 +------------------------------------------ 4 files changed, 14 insertions(+), 167 deletions(-) diff --git a/dlls/mmdevapi/client.c b/dlls/mmdevapi/client.c index c7cf577432a..312bc462c3b 100644 --- a/dlls/mmdevapi/client.c +++ b/dlls/mmdevapi/client.c @@ -36,7 +36,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi); extern void sessions_lock(void) DECLSPEC_HIDDEN; extern void sessions_unlock(void) DECLSPEC_HIDDEN; -extern void set_stream_volumes(struct audio_client *This) DECLSPEC_HIDDEN; +void set_stream_volumes(struct audio_client *This) +{ + struct set_volumes_params params; + + params.stream = This->stream; + params.master_volume = (This->session->mute ? 0.0f : This->session->master_vol); + params.volumes = This->vols; + params.session_volumes = This->session->channel_vols; + + WINE_UNIX_CALL(set_volumes, ¶ms); +} static inline struct audio_client *impl_from_IAudioStreamVolume(IAudioStreamVolume *iface) { diff --git a/dlls/mmdevapi/session.c b/dlls/mmdevapi/session.c index 9c1b87a229b..81cea5b3482 100644 --- a/dlls/mmdevapi/session.c +++ b/dlls/mmdevapi/session.c @@ -33,17 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi); extern void sessions_lock(void) DECLSPEC_HIDDEN; extern void sessions_unlock(void) DECLSPEC_HIDDEN; -void set_stream_volumes(struct audio_client *This) -{ - struct set_volumes_params params; - - params.stream = This->stream; - params.master_volume = (This->session->mute ? 0.0f : This->session->master_vol); - params.volumes = This->vols; - params.session_volumes = This->session->channel_vols; - - WINE_UNIX_CALL(set_volumes, ¶ms); -} +extern void set_stream_volumes(struct audio_client *This) DECLSPEC_HIDDEN; static inline struct audio_session_wrapper *impl_from_IAudioSessionControl2(IAudioSessionControl2 *iface) { diff --git a/dlls/wineoss.drv/Makefile.in b/dlls/wineoss.drv/Makefile.in index a6e56f3065c..121595a7c6c 100644 --- a/dlls/wineoss.drv/Makefile.in +++ b/dlls/wineoss.drv/Makefile.in @@ -7,6 +7,7 @@ UNIX_LIBS = $(OSS4_LIBS) $(PTHREAD_LIBS) UNIX_CFLAGS = $(OSS4_CFLAGS) C_SRCS = \ + client.c \ midi.c \ midipatch.c \ mmaux.c \ diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index ae9d879cb02..1940750d484 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -84,7 +84,7 @@ extern const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl; extern const ISimpleAudioVolumeVtbl SimpleAudioVolume_Vtbl; static const IAudioClockVtbl AudioClock_Vtbl; static const IAudioClock2Vtbl AudioClock2_Vtbl; -static const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl; +extern const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl; extern const IChannelAudioVolumeVtbl ChannelAudioVolume_Vtbl; void DECLSPEC_HIDDEN sessions_lock(void) @@ -1449,160 +1449,6 @@ static AudioSessionWrapper *AudioSessionWrapper_Create(ACImpl *client) return ret; } -static HRESULT WINAPI AudioStreamVolume_QueryInterface( - IAudioStreamVolume *iface, REFIID riid, void **ppv) -{ - TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv); - - if(!ppv) - return E_POINTER; - *ppv = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IAudioStreamVolume)) - *ppv = iface; - if(*ppv){ - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - - WARN("Unknown interface %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI AudioStreamVolume_AddRef(IAudioStreamVolume *iface) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - return IAudioClient3_AddRef(&This->IAudioClient3_iface); -} - -static ULONG WINAPI AudioStreamVolume_Release(IAudioStreamVolume *iface) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - return IAudioClient3_Release(&This->IAudioClient3_iface); -} - -static HRESULT WINAPI AudioStreamVolume_GetChannelCount( - IAudioStreamVolume *iface, UINT32 *out) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%p)\n", This, out); - - if(!out) - return E_POINTER; - - *out = This->channel_count; - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_SetChannelVolume( - IAudioStreamVolume *iface, UINT32 index, float level) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%d, %f)\n", This, index, level); - - if(level < 0.f || level > 1.f) - return E_INVALIDARG; - - if(index >= This->channel_count) - return E_INVALIDARG; - - sessions_lock(); - - This->vols[index] = level; - - TRACE("OSS doesn't support setting volume\n"); - set_stream_volumes(This); - - sessions_unlock(); - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_GetChannelVolume( - IAudioStreamVolume *iface, UINT32 index, float *level) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%d, %p)\n", This, index, level); - - if(!level) - return E_POINTER; - - if(index >= This->channel_count) - return E_INVALIDARG; - - *level = This->vols[index]; - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_SetAllVolumes( - IAudioStreamVolume *iface, UINT32 count, const float *levels) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - int i; - - TRACE("(%p)->(%d, %p)\n", This, count, levels); - - if(!levels) - return E_POINTER; - - if(count != This->channel_count) - return E_INVALIDARG; - - sessions_lock(); - - for(i = 0; i < count; ++i) - This->vols[i] = levels[i]; - - TRACE("OSS doesn't support setting volume\n"); - set_stream_volumes(This); - - sessions_unlock(); - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_GetAllVolumes( - IAudioStreamVolume *iface, UINT32 count, float *levels) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - int i; - - TRACE("(%p)->(%d, %p)\n", This, count, levels); - - if(!levels) - return E_POINTER; - - if(count != This->channel_count) - return E_INVALIDARG; - - sessions_lock(); - - for(i = 0; i < count; ++i) - levels[i] = This->vols[i]; - - sessions_unlock(); - - return S_OK; -} - -static const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl = -{ - AudioStreamVolume_QueryInterface, - AudioStreamVolume_AddRef, - AudioStreamVolume_Release, - AudioStreamVolume_GetChannelCount, - AudioStreamVolume_SetChannelVolume, - AudioStreamVolume_GetChannelVolume, - AudioStreamVolume_SetAllVolumes, - AudioStreamVolume_GetAllVolumes -}; - HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device, AudioSessionWrapper **out) {
1
0
0
0
Davide Beatrici : winecoreaudio: Use mmdevapi's AudioStreamVolume.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: d8b098dbde210895feb7b60e49ce8caea48f8b3a URL:
https://gitlab.winehq.org/wine/wine/-/commit/d8b098dbde210895feb7b60e49ce8c…
Author: Davide Beatrici <git(a)davidebeatrici.dev> Date: Tue May 9 06:34:24 2023 +0200 winecoreaudio: Use mmdevapi's AudioStreamVolume. --- dlls/winecoreaudio.drv/Makefile.in | 1 + dlls/winecoreaudio.drv/mmdevdrv.c | 159 +------------------------------------ 2 files changed, 2 insertions(+), 158 deletions(-) diff --git a/dlls/winecoreaudio.drv/Makefile.in b/dlls/winecoreaudio.drv/Makefile.in index 8b40ab19afe..01c5a3d0073 100644 --- a/dlls/winecoreaudio.drv/Makefile.in +++ b/dlls/winecoreaudio.drv/Makefile.in @@ -6,6 +6,7 @@ DELAYIMPORTS = winmm UNIX_LIBS = $(COREAUDIO_LIBS) C_SRCS = \ + client.c \ coreaudio.c \ coremidi.c \ midi.c \ diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 835bfc6978e..7f7bb0ecfbb 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -58,7 +58,7 @@ extern const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl; extern const ISimpleAudioVolumeVtbl SimpleAudioVolume_Vtbl; static const IAudioClockVtbl AudioClock_Vtbl; static const IAudioClock2Vtbl AudioClock2_Vtbl; -static const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl; +extern const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl; extern const IChannelAudioVolumeVtbl ChannelAudioVolume_Vtbl; static WCHAR drv_key_devicesW[256]; @@ -110,11 +110,6 @@ static inline ACImpl *impl_from_IAudioClock2(IAudioClock2 *iface) return CONTAINING_RECORD(iface, ACImpl, IAudioClock2_iface); } -static inline ACImpl *impl_from_IAudioStreamVolume(IAudioStreamVolume *iface) -{ - return CONTAINING_RECORD(iface, ACImpl, IAudioStreamVolume_iface); -} - BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved) { switch (reason) @@ -1450,158 +1445,6 @@ static AudioSessionWrapper *AudioSessionWrapper_Create(ACImpl *client) return ret; } -static HRESULT WINAPI AudioStreamVolume_QueryInterface( - IAudioStreamVolume *iface, REFIID riid, void **ppv) -{ - TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv); - - if(!ppv) - return E_POINTER; - *ppv = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IAudioStreamVolume)) - *ppv = iface; - if(*ppv){ - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - - WARN("Unknown interface %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI AudioStreamVolume_AddRef(IAudioStreamVolume *iface) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - return IAudioClient3_AddRef(&This->IAudioClient3_iface); -} - -static ULONG WINAPI AudioStreamVolume_Release(IAudioStreamVolume *iface) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - return IAudioClient3_Release(&This->IAudioClient3_iface); -} - -static HRESULT WINAPI AudioStreamVolume_GetChannelCount( - IAudioStreamVolume *iface, UINT32 *out) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%p)\n", This, out); - - if(!out) - return E_POINTER; - - *out = This->channel_count; - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_SetChannelVolume( - IAudioStreamVolume *iface, UINT32 index, float level) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%d, %f)\n", This, index, level); - - if(level < 0.f || level > 1.f) - return E_INVALIDARG; - - if(index >= This->channel_count) - return E_INVALIDARG; - - sessions_lock(); - - This->vols[index] = level; - - set_stream_volumes(This); - - sessions_unlock(); - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_GetChannelVolume( - IAudioStreamVolume *iface, UINT32 index, float *level) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%d, %p)\n", This, index, level); - - if(!level) - return E_POINTER; - - if(index >= This->channel_count) - return E_INVALIDARG; - - *level = This->vols[index]; - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_SetAllVolumes( - IAudioStreamVolume *iface, UINT32 count, const float *levels) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - UINT32 i; - - TRACE("(%p)->(%d, %p)\n", This, count, levels); - - if(!levels) - return E_POINTER; - - if(count != This->channel_count) - return E_INVALIDARG; - - sessions_lock(); - - for(i = 0; i < count; ++i) - This->vols[i] = levels[i]; - - set_stream_volumes(This); - - sessions_unlock(); - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_GetAllVolumes( - IAudioStreamVolume *iface, UINT32 count, float *levels) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - UINT32 i; - - TRACE("(%p)->(%d, %p)\n", This, count, levels); - - if(!levels) - return E_POINTER; - - if(count != This->channel_count) - return E_INVALIDARG; - - sessions_lock(); - - for(i = 0; i < count; ++i) - levels[i] = This->vols[i]; - - sessions_unlock(); - - return S_OK; -} - -static const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl = -{ - AudioStreamVolume_QueryInterface, - AudioStreamVolume_AddRef, - AudioStreamVolume_Release, - AudioStreamVolume_GetChannelCount, - AudioStreamVolume_SetChannelVolume, - AudioStreamVolume_GetChannelVolume, - AudioStreamVolume_SetAllVolumes, - AudioStreamVolume_GetAllVolumes -}; - HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device, AudioSessionWrapper **out) {
1
0
0
0
Davide Beatrici : winealsa: Use mmdevapi's AudioStreamVolume.
by Alexandre Julliard
10 May '23
10 May '23
Module: wine Branch: master Commit: 844cf46d169feda4ac2713b5f245bf530c570f32 URL:
https://gitlab.winehq.org/wine/wine/-/commit/844cf46d169feda4ac2713b5f245bf…
Author: Davide Beatrici <git(a)davidebeatrici.dev> Date: Tue May 9 09:09:31 2023 +0200 winealsa: Use mmdevapi's AudioStreamVolume. --- dlls/winealsa.drv/Makefile.in | 1 + dlls/winealsa.drv/mmdevdrv.c | 161 +----------------------------------------- 2 files changed, 2 insertions(+), 160 deletions(-) diff --git a/dlls/winealsa.drv/Makefile.in b/dlls/winealsa.drv/Makefile.in index 39e378cb7df..9494858c4dd 100644 --- a/dlls/winealsa.drv/Makefile.in +++ b/dlls/winealsa.drv/Makefile.in @@ -8,6 +8,7 @@ UNIX_LIBS = $(ALSA_LIBS) $(PTHREAD_LIBS) C_SRCS = \ alsa.c \ alsamidi.c \ + client.c \ midi.c \ mmdevdrv.c \ session.c diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 3952d2e6718..ec50c856e38 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -76,7 +76,7 @@ extern const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl; extern const ISimpleAudioVolumeVtbl SimpleAudioVolume_Vtbl; static const IAudioClockVtbl AudioClock_Vtbl; static const IAudioClock2Vtbl AudioClock2_Vtbl; -static const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl; +extern const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl; extern const IChannelAudioVolumeVtbl ChannelAudioVolume_Vtbl; static AudioSessionWrapper *AudioSessionWrapper_Create(ACImpl *client); @@ -116,11 +116,6 @@ static inline ACImpl *impl_from_IAudioClock2(IAudioClock2 *iface) return CONTAINING_RECORD(iface, ACImpl, IAudioClock2_iface); } -static inline ACImpl *impl_from_IAudioStreamVolume(IAudioStreamVolume *iface) -{ - return CONTAINING_RECORD(iface, ACImpl, IAudioStreamVolume_iface); -} - BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved) { switch (reason) @@ -1500,160 +1495,6 @@ static AudioSessionWrapper *AudioSessionWrapper_Create(ACImpl *client) return ret; } -static HRESULT WINAPI AudioStreamVolume_QueryInterface( - IAudioStreamVolume *iface, REFIID riid, void **ppv) -{ - TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv); - - if(!ppv) - return E_POINTER; - *ppv = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IAudioStreamVolume)) - *ppv = iface; - if(*ppv){ - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - - WARN("Unknown interface %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI AudioStreamVolume_AddRef(IAudioStreamVolume *iface) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - return IAudioClient3_AddRef(&This->IAudioClient3_iface); -} - -static ULONG WINAPI AudioStreamVolume_Release(IAudioStreamVolume *iface) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - return IAudioClient3_Release(&This->IAudioClient3_iface); -} - -static HRESULT WINAPI AudioStreamVolume_GetChannelCount( - IAudioStreamVolume *iface, UINT32 *out) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%p)\n", This, out); - - if(!out) - return E_POINTER; - - *out = This->channel_count; - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_SetChannelVolume( - IAudioStreamVolume *iface, UINT32 index, float level) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%d, %f)\n", This, index, level); - - if(level < 0.f || level > 1.f) - return E_INVALIDARG; - - if(index >= This->channel_count) - return E_INVALIDARG; - - TRACE("ALSA does not support volume control\n"); - - sessions_lock(); - - This->vols[index] = level; - set_stream_volumes(This); - - sessions_unlock(); - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_GetChannelVolume( - IAudioStreamVolume *iface, UINT32 index, float *level) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - - TRACE("(%p)->(%d, %p)\n", This, index, level); - - if(!level) - return E_POINTER; - - if(index >= This->channel_count) - return E_INVALIDARG; - - *level = This->vols[index]; - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_SetAllVolumes( - IAudioStreamVolume *iface, UINT32 count, const float *levels) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - unsigned int i; - - TRACE("(%p)->(%d, %p)\n", This, count, levels); - - if(!levels) - return E_POINTER; - - if(count != This->channel_count) - return E_INVALIDARG; - - TRACE("ALSA does not support volume control\n"); - - sessions_lock(); - - for(i = 0; i < count; ++i) - This->vols[i] = levels[i]; - set_stream_volumes(This); - - sessions_unlock(); - - return S_OK; -} - -static HRESULT WINAPI AudioStreamVolume_GetAllVolumes( - IAudioStreamVolume *iface, UINT32 count, float *levels) -{ - ACImpl *This = impl_from_IAudioStreamVolume(iface); - unsigned int i; - - TRACE("(%p)->(%d, %p)\n", This, count, levels); - - if(!levels) - return E_POINTER; - - if(count != This->channel_count) - return E_INVALIDARG; - - sessions_lock(); - - for(i = 0; i < count; ++i) - levels[i] = This->vols[i]; - - sessions_unlock(); - - return S_OK; -} - -static const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl = -{ - AudioStreamVolume_QueryInterface, - AudioStreamVolume_AddRef, - AudioStreamVolume_Release, - AudioStreamVolume_GetChannelCount, - AudioStreamVolume_SetChannelVolume, - AudioStreamVolume_GetChannelVolume, - AudioStreamVolume_SetAllVolumes, - AudioStreamVolume_GetAllVolumes -}; - HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device, AudioSessionWrapper **out) {
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
78
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
Results per page:
10
25
50
100
200