Akihiro Sagawa
6ce8a31b0b
dsound: Initialize MTA in IDirectSound::Initialize().
...
RE:D Cherish! (Trial ver) depends on this behavior.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53613
2024-03-21 22:19:58 +01:00
Akihiro Sagawa
67153fa0c3
dsound/tests: Add tests for implicit MTA creation in IDirectSound::Initialize().
...
On recent Windows, at least Windows 7, a multithread apartment (MTA) is
initialized within IDirectSound::Initialize().
2024-03-21 22:19:58 +01:00
Paul Gofman
c63a990091
dsound: Force debug info in critical sections.
2024-02-21 22:30:03 +01:00
Zhiyi Zhang
7c7b2e8e7e
dsound: Reject WAVEFORMATEX formats with more than two channels.
...
Formats with more than two channels require WAVEFORMATEXTENSIBLE according to tests.
Fix Viking: Battle for Asgard (211160) audio cracking in its intro video.
2024-02-20 10:44:05 +01:00
Zhiyi Zhang
b3ec5bc7ea
dsound/tests: Test that formats with more than two channels require WAVEFORMATEXTENSIBLE.
2024-02-20 10:44:05 +01:00
Jacek Caban
4e54087fab
dsound: Simplify f_to_32.
2024-02-09 18:00:04 +01:00
Yuxuan Shui
1941a91536
dsound: Set position past the end of the buffer is invalid.
2023-12-07 21:57:59 +01:00
Alex Henrie
5a81b6ac43
dsound: Dynamically allocate the global device GUID arrays.
...
This removes the arbitrary limit on the number of renderers and
capturers while satisfying applications that expect the GUIDs to remain
valid after DirectSoundCaptureEnumerate returns.
2023-11-09 14:38:32 +01:00
Alex Henrie
73654470ab
Revert "dsound: Get rid of the global device GUID arrays.".
...
This reverts commit e1f0318ec4
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55608
2023-11-09 14:38:32 +01:00
Alexandre Julliard
acad49573a
makefiles: Always use the global SOURCES variable for .c files.
2023-11-01 22:44:03 +01:00
Alexandre Julliard
c432eac726
makefiles: Always use the global SOURCES variable for .idl files.
2023-11-01 22:43:50 +01:00
Eric Pouech
79264b27c1
dsound: Forward error code when device cannot be found.
...
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-10-17 21:48:20 +02:00
Alex Henrie
269ce609d9
dsound: Use malloc and free instead of _recalloc.
...
The memory is completely overwritten a few lines later, so there is no
reason to preserve its original contents. Furthermore, _recalloc will
not be available if this DLL switches from ucrtbase to msvcrt, and the
code as written would leak memory if _recalloc failed.
2023-09-20 22:15:29 +02:00
Arkadiusz Hiler
e1f0318ec4
dsound: Get rid of the global device GUID arrays.
...
They are not used for anything anymore and just impose limit of 10
devices of a given type (capturer / renderer) without doing bound
checking.
2023-09-15 11:15:56 +02:00
Arkadiusz Hiler
0b7b6d1050
dsound: Get rid of DSOUND_capturers and related lock.
...
Ever since dcaeb6b4fd
("dsound: Allow multiple buffers to capture from
the same device.") it's not used for anything.
2023-09-14 11:12:59 +02:00
Zebediah Figura
d63acb3b91
dsound: Do not include strmif.h.
...
dsound_private.h pulls in mediaobj.h, which previously pulled in strmif.h.
We were including that under the initguid.h, which meant that strmif.h GUIDs
were being defined in both dsound_main.o and uuid. Now that mediaobj.h does not
pull in strmif.h anymore, we don't need this include.
2023-09-13 20:24:17 +02:00
Alexandre Julliard
20afe43832
Remove unused NONAMELESS defines.
2023-08-15 18:56:45 +02:00
Alistair Leslie-Hughes
0599292ce7
dsound: Remove DECLSPEC_HIDDEN usage.
2023-07-07 12:20:53 +02:00
Anton Baskanov
69d088ca5b
dsound: Take distance and Doppler factor into account.
2023-05-26 11:08:09 +02:00
Anton Baskanov
23eca82ac3
dsound/tests: Test distance and Doppler factor.
2023-05-26 11:08:09 +02:00
Anton Baskanov
ef2d8d8e5d
dsound: Use the value from SetFrequency when 3D processing is disabled.
2023-05-26 11:08:09 +02:00
Anton Baskanov
e7304f7dc6
dsound/tests: Test Doppler shift with 3D processing disabled.
2023-05-26 11:08:09 +02:00
Anton Baskanov
15de4251d1
dsound: Fix Doppler shift in head-relative mode.
2023-05-26 11:08:09 +02:00
Anton Baskanov
aed3f7fb4d
dsound/tests: Test Doppler shift in head-relative mode.
2023-05-26 11:08:09 +02:00
Anton Baskanov
b923aea734
dsound: Clamp the shifted frequency to [DSBFREQUENCY_MIN, DSBFREQUENCY_MAX].
2023-05-24 18:39:47 +02:00
Anton Baskanov
3d5f2f8796
dsound/tests: Test that the shifted frequency is limited to DSBFREQUENCY_MAX.
2023-05-24 18:39:47 +02:00
Anton Baskanov
315e998951
dsound: Limit the Doppler shift to +-0.5 speed of sound.
2023-05-24 18:39:47 +02:00
Anton Baskanov
8acc3b83e8
dsound/tests: Test that the Doppler shift is limited to +-0.5 speed of sound.
2023-05-24 18:39:47 +02:00
Anton Baskanov
81feccb7e3
dsound: Use relative velocity to compute Doppler shift.
...
It's less physically correct but closer to the native behavior.
2023-05-24 18:39:47 +02:00
Anton Baskanov
8c26e7e592
dsound/tests: Test Doppler shift with moving listener.
2023-05-24 18:39:47 +02:00
Anton Baskanov
64cdecc632
dsound: Avoid division by zero when calculating Doppler shift.
2023-05-23 14:43:12 +02:00
Anton Baskanov
feaaa5bcc3
dsound: Change the speed of sound to 360.
2023-05-23 14:43:12 +02:00
Anton Baskanov
24fa177c00
dsound: Enable Doppler shift.
2023-05-23 14:43:12 +02:00
Anton Baskanov
3c349125ea
dsound/tests: Add tests for Doppler shift.
2023-05-23 14:43:12 +02:00
Anton Baskanov
ef275facac
dsound: Store the frequency of 3D buffers separately.
2023-05-23 14:43:12 +02:00
Anton Baskanov
7e334a7a94
dsound: Allocate big enough committedbuff up front.
2023-04-27 18:33:57 +02:00
Anton Baskanov
136726501c
dsound: Acquire the lock when setting 3D buffer parameters.
2023-04-27 18:33:57 +02:00
Anton Baskanov
4871cd032f
dsound: Preserve freqAccNum value in DSOUND_RecalcFormat().
...
Resetting it results in position discontinuity. With frequent
SetFrequency() calls, this produces audible crackling. The issue
affects pedestrian voices in GTA: San Andreas.
2023-04-27 18:33:56 +02:00
Anton Baskanov
c2563de512
dsound: Remove redundant assignments to freqAdjustNum and freqAdjustDen.
2023-04-27 18:33:56 +02:00
Anton Baskanov
7bd2e99b66
dsound: Remove the unused nAvgBytesPerSec field.
2023-04-27 18:33:55 +02:00
Alex Henrie
99396d4986
dsound: Use CRT functions for memory allocation.
2023-02-28 15:07:54 +01:00
Alex Henrie
08ec06da54
uuid: Add propkey.h.
...
Needed to compile Tera Term.
2022-11-08 20:07:51 +01:00
Brendan Shanks
28b6acd155
dsound: Set name of internal threads.
2022-11-08 20:07:51 +01:00
Rémi Bernon
164a4070db
dsound: Avoid using pointer value after free.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-15 11:53:29 +02:00
Eric Pouech
5adca71cd7
dsound/tests: Enable compilation with long types.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-01 22:41:15 +01:00
Eric Pouech
86bc819f07
dsound: Enable compilation with long types.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:40 +01:00
Eric Pouech
c5b0974b93
dsound: Use correct integral type.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:55 +01:00
Alexandre Julliard
f0cd33c69e
include: Add support for defining Win32 types as 'long' where possible.
...
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Florian Will
835dfaab02
dsound: Skip resampling/mixing inaudible buffers.
...
In some situations, "ZUSI 3" has a lot of secondary buffers in the
PLAYING state, but most of these buffers have a really low volume, so
these buffers are multiplied by 0 before mixing (and possibly after
resampling). There can be hundreds of inaudible buffers at the same
time.
In these situations, the dsound mixthread is unable to mix fast enough,
resulting in sound stuttering and generally poor performance.
To resolve this performance issue, skip the mixing (and possibly
resampling) step for all inaudible secondary buffers.
Signed-off-by: Florian Will <florian.will@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 22:55:07 +01:00
Eduard Permyakov
6806954251
dsound: Correctly report hardware audio buffers as unsupported.
...
Signed-off-by: Eduard Permyakov <epermyakov@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 17:59:26 +01:00