Alex Henrie
06d9c7e25e
libport: Move rint fallback implementations from msvcrt to libport.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:39:04 +01:00
Alistair Leslie-Hughes
a731eaa705
dsound: Free MMDevice on Release.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-27 19:14:05 +02:00
Dmitry Timoshkov
c39121fc97
dsound: Fix a memory leak.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-22 22:52:08 +02:00
Michael Stefaniuc
33e0ca4550
dsound/tests: Use a void* instead of void** outer IUnknown argument.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-26 15:53:39 +02:00
Huw Davies
e6f8f136fa
dsound: Pass sample count to the normfunction.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-01 23:35:42 +01:00
Huw Davies
134b684fd9
dsound: Use frame rather than byte counts to clarify the mixing.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-01 23:35:40 +01:00
Huw Davies
7a27cc89aa
dsound: Don't propagate writepos in the non-WRITEPRIMARY case - it's unused.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-01 23:35:34 +01:00
Huw Davies
2233fb3718
dsound: Allow enough space for multi-channel frames.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-28 20:39:27 +01:00
Huw Davies
b47487af99
dsound: Merge two identical allocation blocks.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 21:22:33 +01:00
Huw Davies
3076192e7d
dsound: Correctly update buflen.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 21:22:31 +01:00
Erich E. Hoover
b7118753f4
dsound: Clear the temporary mixing buffer after allocation.
...
Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-06 19:28:46 +01:00
Michael Müller
c8e0f58552
dsound: Respect return value of callback in DirectSoundEnumerateA/W.
...
Fixes a regression introduced in c8c6cc97bc
.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-16 16:54:36 +01:00
Andrew Eikum
0190c50a8c
dsound: Don't write more than three periods to IAudioClient.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-03 20:08:03 +01:00
Andrew Eikum
d961f5ac7e
dsound: Use the value from SetVolume when 3D processing is disabled.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-29 16:52:35 +01:00
Andrew Eikum
1671a83f55
dsound: Fix rolloff factor calculation.
...
We should treat the rolloff factor as a factor of the distance of the
buffer. For example, a rolloff factor of 2 should treat the buffer as if
it were twice as far away from the listener as it is.
The previous calculation would instead double the decibels of
attenuation.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-29 16:52:31 +01:00
Michael Stefaniuc
48b32c78d2
dsound: Avoid casts from COM object to interface.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-09 16:39:09 +01:00
Michael Müller
6fd36314d0
dsound: Pretend that the driver is certified.
...
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 21:33:05 +09:00
Andrew Eikum
b25e1aefc7
Revert "dsound: Allow inactive devices to change the primary format.".
...
This reverts commit 4fbe6f3e76
.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 23:08:37 +09:00
Nikolay Sivov
9567813ec4
dsound: Fix its vs it's typos.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 09:08:38 -05:00
Detlef Riekenberg
443130c4cf
dsound: Mark a multiplication factor as float.
...
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-05 23:27:38 +09:00
Andrew Eikum
7300f1b75d
dsound: Capture all available data on each period callback.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-16 11:29:52 +09:00
Nikolay Sivov
d597ea8f03
dsound: Remove redundant null pointer check (Coverity).
...
IAudioClient instance could be expected to be valid at this point.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-06 22:18:14 +09:00
Andrew Eikum
1def346bab
dsound: Support downmixing quadraphonic to stereo.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-19 23:42:06 +09:00
Andrew Eikum
88dd3b4f6e
dsound: Support downmixing 5.1 to stereo.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-19 23:42:02 +09:00
Andrew Eikum
4fbe6f3e76
dsound: Allow inactive devices to change the primary format.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-19 23:41:53 +09:00
Maarten Lankhorst
db316c1243
dsound: Remove unconditional memory allocation in mixing thread.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-18 10:36:56 +09:00
Maarten Lankhorst
5b0914ece9
dsound: Remove state machine from render buffer.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-18 10:36:54 +09:00
Maarten Lankhorst
2fb97be187
dsound: Prevent reopening device from leaving dsound object in invalid state.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-18 10:36:52 +09:00
Maarten Lankhorst
0adf2af7ff
dsound: Fixup IDirectSoundCaptureBuffer_QueryInterface.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-17 11:51:43 +09:00
Maarten Lankhorst
a330b01143
dsound: Fixup DSOUND_WaveQueue checks.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-17 11:51:41 +09:00
Sebastian Lackner
65bab6a5fe
dsound: Get rid of no longer needed mix_buffer_len field.
...
This was missing in 09890d7142
.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-16 22:59:11 +09:00
Maarten Lankhorst
09890d7142
dsound: Mix float natively.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 14:39:52 +09:00
Maarten Lankhorst
95287ac2df
dsound: Use AudioClient for position.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 14:39:52 +09:00
Maarten Lankhorst
569ed159b0
dsound: Use AudioClient buffer statistics.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 14:39:52 +09:00
Andrew Eikum
f461610e6c
dsound: Handle default case in dsound3d mode switch (Coverity).
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 12:17:58 +09:00
Andrew Eikum
468477b694
dsound: Avoid NULL pointer dereference (Coverity).
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 12:17:55 +09:00
Michael Stefaniuc
bb72548f38
dsound: Use a better name for IDirectSoundBufferImpl_Create().
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-22 13:50:45 +01:00
Michael Stefaniuc
d51d55bab8
dsound: Simplify error handling when creating a sound buffer.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-22 13:50:42 +01:00
Michael Stefaniuc
0e5dcc2c84
dsound: Fail to create a version 8 3d buffer with DSBCAPS_CTRLPAN.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 19:50:29 +01:00
Michael Stefaniuc
e69d9ec3c4
dsound: A version 1 3d secondary buffer allows SetPan().
...
For version 8 DSBCAPS_CTRL3D and DSBCAPS_CTRLPAN are mutually exclusive
and a sound buffer cannot be created when both flags are set.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-02 23:45:17 +09:00
Michael Stefaniuc
25d23d4432
dsound/tests: Test Pan for 3D secondary buffers too.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-02 23:45:14 +09:00
Michael Stefaniuc
72d67a2d4e
dsound/tests: Version differences in flag handling for 3d buffers.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-02 23:45:10 +09:00
Francois Gouget
413c6f60cf
Assorted spelling fixes.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-02 12:59:52 +09:00
Andrew Eikum
ff25b25a49
dsound: Don't set very low limits on HW buffers.
2015-05-11 15:19:05 +09:00
Andrew Eikum
2edb4bf320
dsound: Apply rolloff factor to distance attenuation.
2015-04-29 12:23:46 +09:00
Andrew Eikum
582b54329d
dsound/tests: Don't perform ALAW test on secondary buffers.
...
win2k supports it, winxp gives one error, vista+ gives another. This
isn't interesting behavior to test.
2015-04-15 16:22:10 +09:00
Igor Kotrasinski
65e19a096d
dsound: Fix conning formula to correctly interpolate volume.
2015-04-14 16:51:25 +09:00
Andrew Eikum
a9a80b56b1
dsound: Stricter validation for formats in secondary buffers.
2015-04-14 16:50:15 +09:00
Stas Cymbalov
c1c108f58c
dsound: Fix angle to sound source calculation.
2015-04-06 23:29:19 +09:00
Alexandre Julliard
8427c7816d
dsound: Fix an error return code.
2015-03-27 11:33:50 +09:00