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
Zebediah Figura : vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_neg().
by Alexandre Julliard
23 May '23
23 May '23
Module: vkd3d Branch: master Commit: 7d9b24fe11e88e7e2c757acd2fd63e5ab7cb31bb URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/7d9b24fe11e88e7e2c757acd2fd63…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Nov 11 18:46:10 2022 -0600 vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_neg(). --- libs/vkd3d-shader/hlsl_constant_ops.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d-shader/hlsl_constant_ops.c index 676126d7..2a2b4729 100644 --- a/libs/vkd3d-shader/hlsl_constant_ops.c +++ b/libs/vkd3d-shader/hlsl_constant_ops.c @@ -151,9 +151,10 @@ static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, return true; } -static bool fold_neg(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst, struct hlsl_ir_constant *src) +static bool fold_neg(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, + const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src) { - enum hlsl_base_type type = dst->node.data_type->base_type; + enum hlsl_base_type type = dst_type->base_type; unsigned int k; assert(type == src->node.data_type->base_type); @@ -164,20 +165,20 @@ static bool fold_neg(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst, struct { case HLSL_TYPE_FLOAT: case HLSL_TYPE_HALF: - dst->value.u[k].f = -src->value.u[k].f; + dst->u[k].f = -src->value.u[k].f; break; case HLSL_TYPE_DOUBLE: - dst->value.u[k].d = -src->value.u[k].d; + dst->u[k].d = -src->value.u[k].d; break; case HLSL_TYPE_INT: case HLSL_TYPE_UINT: - dst->value.u[k].u = -src->value.u[k].u; + dst->u[k].u = -src->value.u[k].u; break; default: - FIXME("Fold negation for type %s.\n", debug_hlsl_type(ctx, dst->node.data_type)); + FIXME("Fold negation for type %s.\n", debug_hlsl_type(ctx, dst_type)); return false; } } @@ -583,7 +584,7 @@ bool hlsl_fold_constant_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, break; case HLSL_OP1_NEG: - success = fold_neg(ctx, res, arg1); + success = fold_neg(ctx, &res->value, instr->data_type, arg1); break; case HLSL_OP2_ADD:
1
0
0
0
Zebediah Figura : vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_cast().
by Alexandre Julliard
23 May '23
23 May '23
Module: vkd3d Branch: master Commit: eb04829e669ec877f994031057113c3f38c0b30d URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/eb04829e669ec877f994031057113…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Nov 11 18:43:57 2022 -0600 vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_cast(). --- libs/vkd3d-shader/hlsl_constant_ops.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d-shader/hlsl_constant_ops.c index 0eca3939..676126d7 100644 --- a/libs/vkd3d-shader/hlsl_constant_ops.c +++ b/libs/vkd3d-shader/hlsl_constant_ops.c @@ -62,7 +62,8 @@ static bool fold_abs(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst, struct return true; } -static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst, struct hlsl_ir_constant *src) +static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, + const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src) { unsigned int k; uint32_t u; @@ -70,11 +71,11 @@ static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst, struct double d; float f; - if (dst->node.data_type->dimx != src->node.data_type->dimx - || dst->node.data_type->dimy != src->node.data_type->dimy) + if (dst_type->dimx != src->node.data_type->dimx + || dst_type->dimy != src->node.data_type->dimy) { FIXME("Cast from %s to %s.\n", debug_hlsl_type(ctx, src->node.data_type), - debug_hlsl_type(ctx, dst->node.data_type)); + debug_hlsl_type(ctx, dst_type)); return false; } @@ -122,23 +123,23 @@ static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst, struct vkd3d_unreachable(); } - switch (dst->node.data_type->base_type) + switch (dst_type->base_type) { case HLSL_TYPE_FLOAT: case HLSL_TYPE_HALF: - dst->value.u[k].f = f; + dst->u[k].f = f; break; case HLSL_TYPE_DOUBLE: - dst->value.u[k].d = d; + dst->u[k].d = d; break; case HLSL_TYPE_INT: - dst->value.u[k].i = i; + dst->u[k].i = i; break; case HLSL_TYPE_UINT: - dst->value.u[k].u = u; + dst->u[k].u = u; break; case HLSL_TYPE_BOOL: @@ -578,7 +579,7 @@ bool hlsl_fold_constant_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, break; case HLSL_OP1_CAST: - success = fold_cast(ctx, res, arg1); + success = fold_cast(ctx, &res->value, instr->data_type, arg1); break; case HLSL_OP1_NEG:
1
0
0
0
Davide Beatrici : winepulse: Implement is_format_supported in unixlib.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: f5baa375c84cd080e36c51f2e8b3df7c18686fa8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f5baa375c84cd080e36c51f2e8b3df…
Author: Davide Beatrici <git(a)davidebeatrici.dev> Date: Tue May 23 10:11:38 2023 +0200 winepulse: Implement is_format_supported in unixlib. --- dlls/winepulse.drv/mmdevdrv.c | 174 +++++------------------------------------- dlls/winepulse.drv/pulse.c | 171 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 186 insertions(+), 159 deletions(-)
1
0
0
0
Davide Beatrici : wineoss: Implement get_device_period in unixlib.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 2127a8a0d74cc81e15a34068ffc986c30f8a75e3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2127a8a0d74cc81e15a34068ffc986…
Author: Davide Beatrici <git(a)davidebeatrici.dev> Date: Tue May 23 10:17:10 2023 +0200 wineoss: Implement get_device_period in unixlib. --- dlls/wineoss.drv/mmdevdrv.c | 15 +++++++++------ dlls/wineoss.drv/oss.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index dac5790e384..c55176307f0 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -785,18 +785,21 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface, REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod) { ACImpl *This = impl_from_IAudioClient3(iface); + struct get_device_period_params params; TRACE("(%p)->(%p, %p)\n", This, defperiod, minperiod); - if(!defperiod && !minperiod) + if (!defperiod && !minperiod) return E_POINTER; - if(defperiod) - *defperiod = DefaultPeriod; - if(minperiod) - *minperiod = MinimumPeriod; + params.device = This->device_name; + params.flow = This->dataflow; + params.def_period = defperiod; + params.min_period = minperiod; - return S_OK; + OSS_CALL(get_device_period, ¶ms); + + return params.result; } static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface) diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c index d8225b65889..585df97bc43 100644 --- a/dlls/wineoss.drv/oss.c +++ b/dlls/wineoss.drv/oss.c @@ -69,6 +69,9 @@ struct oss_stream WINE_DEFAULT_DEBUG_CHANNEL(oss); +static const REFERENCE_TIME def_period = 100000; +static const REFERENCE_TIME min_period = 50000; + static NTSTATUS oss_not_implemented(void *args) { return STATUS_SUCCESS; @@ -1245,6 +1248,20 @@ static NTSTATUS oss_get_mix_format(void *args) return STATUS_SUCCESS; } +static NTSTATUS oss_get_device_period(void *args) +{ + struct get_device_period_params *params = args; + + if (params->def_period) + *params->def_period = def_period; + if (params->min_period) + *params->min_period = min_period; + + params->result = S_OK; + + return STATUS_SUCCESS; +} + static NTSTATUS oss_get_buffer_size(void *args) { struct get_buffer_size_params *params = args; @@ -1649,7 +1666,7 @@ unixlib_entry_t __wine_unix_call_funcs[] = oss_release_capture_buffer, oss_is_format_supported, oss_get_mix_format, - oss_not_implemented, + oss_get_device_period, oss_get_buffer_size, oss_get_latency, oss_get_current_padding, @@ -1860,6 +1877,28 @@ static NTSTATUS oss_wow64_get_mix_format(void *args) return STATUS_SUCCESS; } +static NTSTATUS oss_wow64_get_device_period(void *args) +{ + struct + { + PTR32 device; + EDataFlow flow; + HRESULT result; + PTR32 def_period; + PTR32 min_period; + } *params32 = args; + struct get_device_period_params params = + { + .device = ULongToPtr(params32->device), + .flow = params32->flow, + .def_period = ULongToPtr(params32->def_period), + .min_period = ULongToPtr(params32->min_period), + }; + oss_get_device_period(¶ms); + params32->result = params.result; + return STATUS_SUCCESS; +} + static NTSTATUS oss_wow64_get_buffer_size(void *args) { struct @@ -2051,7 +2090,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] = oss_release_capture_buffer, oss_wow64_is_format_supported, oss_wow64_get_mix_format, - oss_not_implemented, + oss_wow64_get_device_period, oss_wow64_get_buffer_size, oss_wow64_get_latency, oss_wow64_get_current_padding,
1
0
0
0
Davide Beatrici : winecoreaudio: Implement get_device_period in unixlib.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: d6728615c93f7cbdae710f49d7bc2d9d95efe820 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d6728615c93f7cbdae710f49d7bc2d…
Author: Davide Beatrici <git(a)davidebeatrici.dev> Date: Tue May 23 10:16:19 2023 +0200 winecoreaudio: Implement get_device_period in unixlib. --- dlls/winecoreaudio.drv/coreaudio.c | 43 ++++++++++++++++++++++++++++++++++++-- dlls/winecoreaudio.drv/mmdevdrv.c | 15 +++++++------ 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/dlls/winecoreaudio.drv/coreaudio.c b/dlls/winecoreaudio.drv/coreaudio.c index ecd137ce609..89265558a1d 100644 --- a/dlls/winecoreaudio.drv/coreaudio.c +++ b/dlls/winecoreaudio.drv/coreaudio.c @@ -100,6 +100,9 @@ struct coreaudio_stream BYTE *local_buffer, *cap_buffer, *wrap_buffer, *resamp_buffer, *tmp_buffer; }; +static const REFERENCE_TIME def_period = 100000; +static const REFERENCE_TIME min_period = 50000; + static NTSTATUS unix_not_implemented(void *args) { return STATUS_SUCCESS; @@ -1087,6 +1090,20 @@ unsupported: return STATUS_SUCCESS; } +static NTSTATUS unix_get_device_period(void *args) +{ + struct get_device_period_params *params = args; + + if (params->def_period) + *params->def_period = def_period; + if (params->min_period) + *params->min_period = min_period; + + params->result = S_OK; + + return STATUS_SUCCESS; +} + static UINT buf_ptr_diff(UINT left, UINT right, UINT bufsize) { if(left <= right) @@ -1739,7 +1756,7 @@ unixlib_entry_t __wine_unix_call_funcs[] = unix_release_capture_buffer, unix_is_format_supported, unix_get_mix_format, - unix_not_implemented, + unix_get_device_period, unix_get_buffer_size, unix_get_latency, unix_get_current_padding, @@ -1934,6 +1951,28 @@ static NTSTATUS unix_wow64_get_mix_format(void *args) return STATUS_SUCCESS; } +static NTSTATUS unix_wow64_get_device_period(void *args) +{ + struct + { + PTR32 device; + EDataFlow flow; + HRESULT result; + PTR32 def_period; + PTR32 min_period; + } *params32 = args; + struct get_device_period_params params = + { + .device = ULongToPtr(params32->device), + .flow = params32->flow, + .def_period = ULongToPtr(params32->def_period), + .min_period = ULongToPtr(params32->min_period), + }; + unix_get_device_period(¶ms); + params32->result = params.result; + return STATUS_SUCCESS; +} + static NTSTATUS unix_wow64_get_buffer_size(void *args) { struct @@ -2099,7 +2138,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] = unix_release_capture_buffer, unix_wow64_is_format_supported, unix_wow64_get_mix_format, - unix_not_implemented, + unix_wow64_get_device_period, unix_wow64_get_buffer_size, unix_wow64_get_latency, unix_wow64_get_current_padding, diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 756aab93f71..d8a2e9e5d21 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -790,18 +790,21 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface, REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod) { ACImpl *This = impl_from_IAudioClient3(iface); + struct get_device_period_params params; TRACE("(%p)->(%p, %p)\n", This, defperiod, minperiod); - if(!defperiod && !minperiod) + if (!defperiod && !minperiod) return E_POINTER; - if(defperiod) - *defperiod = DefaultPeriod; - if(minperiod) - *minperiod = MinimumPeriod; + params.device = This->device_name; + params.flow = This->dataflow; + params.def_period = defperiod; + params.min_period = minperiod; - return S_OK; + UNIX_CALL(get_device_period, ¶ms); + + return params.result; } static DWORD WINAPI ca_timer_thread(void *user)
1
0
0
0
Davide Beatrici : winealsa: Implement get_device_period in unixlib.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 1adee1bce4553f2579c4d9fec3061d6de7a7ffdd URL:
https://gitlab.winehq.org/wine/wine/-/commit/1adee1bce4553f2579c4d9fec3061d…
Author: Davide Beatrici <git(a)davidebeatrici.dev> Date: Tue May 23 10:15:32 2023 +0200 winealsa: Implement get_device_period in unixlib. --- dlls/winealsa.drv/alsa.c | 44 +++++++++++++++++++++++++++++++++++++++++--- dlls/winealsa.drv/mmdevdrv.c | 15 +++++++++------ 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c index f1a55e842db..2ac126f411d 100644 --- a/dlls/winealsa.drv/alsa.c +++ b/dlls/winealsa.drv/alsa.c @@ -82,7 +82,9 @@ struct alsa_stream pthread_mutex_t lock; }; -#define EXTRA_SAFE_RT 40000 +#define EXTRA_SAFE_RT 40000 + +static const REFERENCE_TIME def_period = 100000; static const WCHAR drv_keyW[] = {'S','o','f','t','w','a','r','e','\\', 'W','i','n','e','\\','D','r','i','v','e','r','s','\\', @@ -2096,6 +2098,20 @@ exit: return STATUS_SUCCESS; } +static NTSTATUS alsa_get_device_period(void *args) +{ + struct get_device_period_params *params = args; + + if (params->def_period) + *params->def_period = def_period; + if (params->min_period) + *params->min_period = def_period; + + params->result = S_OK; + + return STATUS_SUCCESS; +} + static NTSTATUS alsa_get_buffer_size(void *args) { struct get_buffer_size_params *params = args; @@ -2458,7 +2474,7 @@ unixlib_entry_t __wine_unix_call_funcs[] = alsa_release_capture_buffer, alsa_is_format_supported, alsa_get_mix_format, - alsa_not_implemented, + alsa_get_device_period, alsa_get_buffer_size, alsa_get_latency, alsa_get_current_padding, @@ -2653,6 +2669,28 @@ static NTSTATUS alsa_wow64_get_mix_format(void *args) return STATUS_SUCCESS; } +static NTSTATUS alsa_wow64_get_device_period(void *args) +{ + struct + { + PTR32 device; + EDataFlow flow; + HRESULT result; + PTR32 def_period; + PTR32 min_period; + } *params32 = args; + struct get_device_period_params params = + { + .device = ULongToPtr(params32->device), + .flow = params32->flow, + .def_period = ULongToPtr(params32->def_period), + .min_period = ULongToPtr(params32->min_period), + }; + alsa_get_device_period(¶ms); + params32->result = params.result; + return STATUS_SUCCESS; +} + static NTSTATUS alsa_wow64_get_buffer_size(void *args) { struct @@ -2877,7 +2915,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] = alsa_release_capture_buffer, alsa_wow64_is_format_supported, alsa_wow64_get_mix_format, - alsa_not_implemented, + alsa_wow64_get_device_period, alsa_wow64_get_buffer_size, alsa_wow64_get_latency, alsa_wow64_get_current_padding, diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index e556bf5d0c1..0126b1357a2 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -824,18 +824,21 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface, REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod) { ACImpl *This = impl_from_IAudioClient3(iface); + struct get_device_period_params params; TRACE("(%p)->(%p, %p)\n", This, defperiod, minperiod); - if(!defperiod && !minperiod) + if (!defperiod && !minperiod) return E_POINTER; - if(defperiod) - *defperiod = DefaultPeriod; - if(minperiod) - *minperiod = DefaultPeriod; + params.device = This->device_name; + params.flow = This->dataflow; + params.def_period = defperiod; + params.min_period = minperiod; - return S_OK; + ALSA_CALL(get_device_period, ¶ms); + + return params.result; } static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
1
0
0
0
Anton Baskanov : dsound: Avoid division by zero when calculating Doppler shift.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 64cdecc6325e574b6b92e7a247c9f6a0f3396717 URL:
https://gitlab.winehq.org/wine/wine/-/commit/64cdecc6325e574b6b92e7a247c9f6…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Sun Apr 23 23:46:10 2023 +0700 dsound: Avoid division by zero when calculating Doppler shift. --- dlls/dsound/sound3d.c | 3 ++- dlls/dsound/tests/ds3d.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index 5d10af4329c..b062917b219 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -298,7 +298,8 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb) } else if (!(dsb->ds3db_ds3db.vVelocity.x == dsb->device->ds3dl.vVelocity.x && dsb->ds3db_ds3db.vVelocity.y == dsb->device->ds3dl.vVelocity.y && - dsb->ds3db_ds3db.vVelocity.z == dsb->device->ds3dl.vVelocity.z)) + dsb->ds3db_ds3db.vVelocity.z == dsb->device->ds3dl.vVelocity.z) && + !(vDistance.x == 0.0f && vDistance.y == 0.0f && vDistance.z == 0.0f)) { /* calculate length of ds3db_ds3db.vVelocity component which causes Doppler Effect NOTE: if buffer moves TOWARDS the listener, its velocity component is NEGATIVE diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 76269f1fcfe..5e6ba4d204e 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -1439,6 +1439,8 @@ static void test_doppler(GUID *guid, BOOL play) check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, -90, 22050, 29400); check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, 90, 22050, 17640); + check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 0, -90, 22050, 22050); + IDirectSound3DListener_Release(listener); ref = IDirectSoundBuffer_Release(primary); ok(!ref, "Got outstanding refcount %ld.\n", ref);
1
0
0
0
Anton Baskanov : dsound: Change the speed of sound to 360.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: feaaa5bcc31b71eaec20771db6a0e2b68d2c7c09 URL:
https://gitlab.winehq.org/wine/wine/-/commit/feaaa5bcc31b71eaec20771db6a0e2…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Sun Apr 23 22:46:48 2023 +0700 dsound: Change the speed of sound to 360. --- dlls/dsound/sound3d.c | 4 ++-- dlls/dsound/tests/ds3d.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index 3dc563b3579..5d10af4329c 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -49,8 +49,8 @@ #include "dsound.h" #include "dsound_private.h" -/* default velocity of sound in the air */ -#define DEFAULT_VELOCITY 340 +/* according to the tests, native uses 360 as the speed of sound */ +#define DEFAULT_VELOCITY 360 WINE_DEFAULT_DEBUG_CHANNEL(dsound3d); diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index e71041e3a00..76269f1fcfe 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -1436,9 +1436,7 @@ static void test_doppler(GUID *guid, BOOL play) check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, 0, 22050, 22050); check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, -90, 1, -90, 22050, 22050); - /* Wine TODO: The frequency is slightly off. */ check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, -90, 22050, 29400); - /* Wine TODO: The frequency is slightly off. */ check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, 90, 22050, 17640); IDirectSound3DListener_Release(listener);
1
0
0
0
Anton Baskanov : dsound: Enable Doppler shift.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 24fa177c004bc55e3c72767448f8588de00bb94f URL:
https://gitlab.winehq.org/wine/wine/-/commit/24fa177c004bc55e3c72767448f858…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Sun Apr 23 21:49:55 2023 +0700 dsound: Enable Doppler shift. --- dlls/dsound/sound3d.c | 6 +----- dlls/dsound/tests/ds3d.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index 4e98cdc0b8d..3dc563b3579 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -167,6 +167,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb) int i, num_main_speakers; float a, ingain; /* doppler shift related stuff */ + D3DVALUE flFreq, flBufferVel, flListenerVel; TRACE("(%p)\n",dsb); @@ -290,10 +291,6 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb) dsb->freq = dsb->ds3db_freq; - /* FIXME: Doppler Effect disabled since i have no idea which frequency to change and how to do it */ -if(0) -{ - D3DVALUE flFreq, flBufferVel, flListenerVel; /* doppler shift*/ if (!VectorMagnitude(&dsb->ds3db_ds3db.vVelocity) && !VectorMagnitude(&dsb->device->ds3dl.vVelocity)) { @@ -317,7 +314,6 @@ if(0) flBufferVel, flListenerVel, dsb->ds3db_freq, flFreq); dsb->freq = flFreq; } -} DSOUND_RecalcFormat(dsb); diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 4b70e0cc0ee..e71041e3a00 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -1436,9 +1436,9 @@ static void test_doppler(GUID *guid, BOOL play) check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, 0, 22050, 22050); check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, -90, 1, -90, 22050, 22050); - /* Wine TODO: Doppler shift is missing. */ + /* Wine TODO: The frequency is slightly off. */ check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, -90, 22050, 29400); - /* Wine TODO: Doppler shift is missing. */ + /* Wine TODO: The frequency is slightly off. */ check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, 90, 22050, 17640); IDirectSound3DListener_Release(listener);
1
0
0
0
Anton Baskanov : dsound/tests: Add tests for Doppler shift.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 3c349125ea94ec65ef5026be779bfdda7b299fc7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3c349125ea94ec65ef5026be779bfd…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Sun Apr 23 22:37:16 2023 +0700 dsound/tests: Add tests for Doppler shift. --- dlls/dsound/tests/ds3d.c | 201 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 577c4155e9f..4b70e0cc0ee 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -1249,6 +1249,205 @@ return DSERR_GENERIC; return rc; } +static void check_doppler(IDirectSound *dsound, IDirectSound3DListener *listener, + BOOL play, DWORD mode, float listener_pos, float listener_velocity, + float buffer_pos, float buffer_velocity, DWORD set_freq, DWORD expected_freq) +{ + IDirectSound3DBuffer *buffer_3d; + IDirectSoundBuffer *ref_buffer; + IDirectSoundBuffer *buffer; + WAVEFORMATEX format; + DSBUFFERDESC desc; + DWORD locked_size; + void *locked_data; + HRESULT hr; + DWORD freq; + DWORD size; + char *data; + LONG ref; + + if (play) + { + const char *mode_str = ""; + if (mode == DS3DMODE_HEADRELATIVE) + mode_str = "in head-relative mode "; + else if (mode == DS3DMODE_DISABLE) + mode_str = "with 3D processing disabled "; + trace(" Testing Doppler shift %swith listener at %g, velocity %g" + " with sound at %g, velocity %g, frequency %luHz\n", + mode_str, listener_pos, listener_velocity, buffer_pos, buffer_velocity, set_freq); + } + + memset(&format, 0, sizeof(format)); + format.wFormatTag = WAVE_FORMAT_PCM; + format.nChannels = 1; + format.nSamplesPerSec = 22050; + format.wBitsPerSample = 16; + format.nAvgBytesPerSec = 2 * 22050; + format.nBlockAlign = 2; + + data = wave_generate_la(&format, 0.6, &size, FALSE); + + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + desc.dwFlags = 0; + desc.lpwfxFormat = &format; + desc.dwBufferBytes = size; + + hr = IDirectSound_CreateSoundBuffer(dsound, &desc, &ref_buffer, NULL); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirectSoundBuffer_Lock(ref_buffer, 0, 0, &locked_data, &locked_size, NULL, NULL, DSBLOCK_ENTIREBUFFER); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + memcpy(locked_data, data, size); + hr = IDirectSoundBuffer_Unlock(ref_buffer, locked_data, locked_size, NULL, 0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + HeapFree(GetProcessHeap(), 0, data); + + memset(&format, 0, sizeof(format)); + format.wFormatTag = WAVE_FORMAT_PCM; + format.nChannels = 1; + /* Set the sampling frequency of the generated waveform to the frequency + * that the buffer is expected to be played at. This way a successful + * test will produce a 440Hz tone. */ + format.nSamplesPerSec = expected_freq; + format.wBitsPerSample = 16; + format.nAvgBytesPerSec = 2 * expected_freq; + format.nBlockAlign = 2; + + data = wave_generate_la(&format, 0.6, &size, FALSE); + + memset(&format, 0, sizeof(format)); + format.wFormatTag = WAVE_FORMAT_PCM; + format.nChannels = 1; + format.nSamplesPerSec = 22050; + format.wBitsPerSample = 16; + format.nAvgBytesPerSec = 2 * 22050; + format.nBlockAlign = 2; + + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRL3D; + desc.lpwfxFormat = &format; + desc.dwBufferBytes = size; + + hr = IDirectSound_CreateSoundBuffer(dsound, &desc, &buffer, NULL); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSoundBuffer_QueryInterface(buffer, &IID_IDirectSound3DBuffer, (void *)&buffer_3d); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirectSoundBuffer_Lock(buffer, 0, 0, &locked_data, &locked_size, NULL, NULL, DSBLOCK_ENTIREBUFFER); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + memcpy(locked_data, data, size); + hr = IDirectSoundBuffer_Unlock(buffer, locked_data, locked_size, NULL, 0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + HeapFree(GetProcessHeap(), 0, data); + + /* Set to different values first to test that the frequency is updated. */ + hr = IDirectSound3DListener_SetPosition(listener, 0, 0, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSound3DListener_SetVelocity(listener, 0, 0, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSound3DBuffer_SetPosition(buffer_3d, 0, 1, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSound3DBuffer_SetVelocity(buffer_3d, 0, -60, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSound3DListener_CommitDeferredSettings(listener); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirectSound3DListener_SetPosition(listener, 0, listener_pos, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSound3DListener_SetVelocity(listener, 0, listener_velocity, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirectSoundBuffer_SetFrequency(buffer, set_freq); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirectSound3DBuffer_SetMode(buffer_3d, mode, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSound3DBuffer_SetPosition(buffer_3d, 0, buffer_pos, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSound3DBuffer_SetVelocity(buffer_3d, 0, buffer_velocity, 0, DS3D_DEFERRED); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirectSound3DListener_CommitDeferredSettings(listener); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + freq = 0xdeadbeef; + hr = IDirectSoundBuffer_GetFrequency(buffer, &freq); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(freq == set_freq, "Got frequency %lu\n", freq); + + if (play) + { + trace(" Playing a reference 440Hz tone\n"); + hr = IDirectSoundBuffer_Play(ref_buffer, 0, 0, DSBPLAY_LOOPING); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + Sleep(500); + hr = IDirectSoundBuffer_Stop(ref_buffer); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + trace(" Playing a test tone (should be 440Hz)\n"); + hr = IDirectSoundBuffer_Play(buffer, 0, 0, DSBPLAY_LOOPING); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + Sleep(500); + hr = IDirectSoundBuffer_Stop(buffer); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + } + + IDirectSound3DBuffer_Release(buffer_3d); + ref = IDirectSoundBuffer_Release(buffer); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IDirectSoundBuffer_Release(ref_buffer); + ok(!ref, "Got outstanding refcount %ld.\n", ref); +} + +static void test_doppler(GUID *guid, BOOL play) +{ + IDirectSound3DListener *listener; + IDirectSoundBuffer *primary; + IDirectSound *dsound; + DSBUFFERDESC desc; + HRESULT hr; + HWND hwnd; + LONG ref; + + hwnd = get_hwnd(); + + hr = DirectSoundCreate(guid, &dsound, NULL); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirectSound_SetCooperativeLevel(dsound, hwnd, DSSCL_PRIORITY); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRL3D; + hr = IDirectSound_CreateSoundBuffer(dsound, &desc, &primary, NULL); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSound3DListener, (void *)&listener); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + /* When run in interactive mode, the following tests should produce a series + * of 440Hz tones. Any deviation from 440Hz indicates a test failure. */ + + check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, 0, 22050, 22050); + check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, -90, 1, -90, 22050, 22050); + + /* Wine TODO: Doppler shift is missing. */ + check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, -90, 22050, 29400); + /* Wine TODO: Doppler shift is missing. */ + check_doppler(dsound, listener, play, DS3DMODE_NORMAL, 0, 0, 1, 90, 22050, 17640); + + IDirectSound3DListener_Release(listener); + ref = IDirectSoundBuffer_Release(primary); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IDirectSound_Release(dsound); + ok(!ref, "Got outstanding refcount %ld.\n", ref); +} + static unsigned driver_count = 0; static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, @@ -1295,6 +1494,8 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, test_secondary(lpGuid,winetest_interactive,1,1,1,0,0,1); test_secondary(lpGuid,winetest_interactive,1,1,1,0,1,1); + test_doppler(lpGuid,winetest_interactive); + return TRUE; }
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
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