Commit Graph

142 Commits

Author SHA1 Message Date
Andrew Eikum ecd13dcbef dsound: Fix fragment position calculations. 2011-10-06 12:28:22 -05:00
Andrew Eikum e786998daf dsound: Reimplement rendering devices on mmdevapi. 2011-09-27 16:53:51 +02:00
Andrew Eikum b1fdaa81b0 dsound: Remove hardware acceleration support. 2011-09-26 18:38:07 +02:00
Philipp Middendorf f5721560f5 dsound: Handle 8 channel audio input. 2011-04-07 10:23:00 +02:00
Andrew Eikum 54ff22b844 dsound: Also handle two-to-six-channel conversions. 2011-03-02 12:50:58 +01:00
Maarten Lankhorst af5423ef57 dsound: Forcibly lock buffers to be mixed. 2011-02-14 13:33:32 +01:00
Owen Rudge d6f3ca9589 dsound: Add support for 32-bit IEEE float buffers. 2011-01-20 17:50:04 +01:00
Maarten Lankhorst 2d5c4944c1 dsound: Unofficially support 5.1 sound. 2010-06-08 12:59:58 +02:00
Maarten Lankhorst 1719f8faf1 dsound: Improve underrun behavior. 2010-03-15 13:28:24 +01:00
Henri Verbeet 5570a1da8e dsound: Don't convert single samples at a time.
This gives a minor performance improvement.
2009-01-15 12:43:37 +01:00
Maarten Lankhorst 6b6b8d9bfa dsound: 64-bit pointer fixes. 2008-11-26 14:15:50 +01:00
Andrew Talbot 3fae4082ef dsound: Sign-compare warnings fix. 2008-10-01 09:57:00 -05:00
Maarten Lankhorst 6e90756307 winealsa.drv/dsound: Handle underruns better. 2008-09-04 14:09:00 +02:00
Ulrich Hecht 335dec27b7 dsound: Fix notification order. 2008-07-25 11:29:04 +02:00
Jörg Höhle 349abe991e dsound: Fix off by 1 heap error in DSOUND_MixerVol. 2008-05-21 11:36:30 +02:00
Andrew Talbot 13e405c149 dsound: Remove unused variable. 2008-04-17 11:41:04 +02:00
Austin English b4f52938e4 Spelling fixes. 2008-04-02 23:18:21 +02:00
Maarten Lankhorst 021019ff8f dsound: Add an option to mix sound buffers in the mixer again. 2008-03-17 14:44:46 +01:00
Aric Stewart 6e8c8c28eb dsound: Set the status from STATE_STARTING to STATE_PLAYING before mixing our next buffer so that we do not potentially skip early event when starting. 2008-03-14 13:01:16 +01:00
Andrew Talbot 2cf2807052 dsound: Remove unneeded casts. 2008-01-02 12:38:41 +01:00
Maarten Lankhorst 8de6c8b4a9 dsound: Return primary_done when no mixing needs to be done instead of 0. 2007-11-12 12:56:21 +01:00
Maarten Lankhorst 4d1129f785 dsound: Use a 2 stage mixing/normalization for sound. 2007-11-09 12:24:06 +01:00
Maarten Lankhorst fa3663d6c7 dsound: Add support for 24/32 bits input sound buffers. 2007-11-09 12:20:20 +01:00
Francois Gouget c4b1195c0c Assorted spelling fixes. 2007-10-23 18:20:27 +02:00
Maarten Lankhorst 80192b93eb dsound: Only warn for unsupported channels (or bits) when volume adjustment is done. 2007-10-16 13:19:20 +02:00
Maarten Lankhorst d65ae3ffe9 dsound: Support arbitrarily sized buffers for waveout. 2007-09-11 12:38:04 +02:00
Francois Gouget ebadbd4bd5 Assorted spelling fixes. 2007-08-09 14:13:07 +02:00
Maarten Lankhorst 36e9054629 dsound: Move resampling away from mixer thread. 2007-08-02 11:53:31 +02:00
Maarten Lankhorst 575f34e548 dsound: Add SndQueueMin to have less lock contention in mixer. 2007-07-31 22:20:55 +02:00
Maarten Lankhorst 60f4db0345 dsound: Get rid of DS_HEL_FRAGS. 2007-07-31 22:20:21 +02:00
Maarten Lankhorst 3b9877fa14 dsound: Constify DSOUND_CheckEvent. 2007-07-30 23:37:58 +02:00
Maarten Lankhorst a335f68bfb dsound: Fix locking in mixer. 2007-07-30 23:37:58 +02:00
Maarten Lankhorst 8aaeb0d4ed dsound: Small mixer optimizations. 2007-07-30 23:37:58 +02:00
Maarten Lankhorst 237b293829 dsound: Replace buffer critical section with a rw-lock. 2007-07-30 23:37:58 +02:00
Maarten Lankhorst f3ed32bca0 dsound: Allow mixing the same buffer multiple times if we are looping. 2007-07-27 12:23:53 +02:00
Maarten Lankhorst 59a5669a97 dsound: Fix CheckEvent in mixer. 2007-07-27 12:22:33 +02:00
Maarten Lankhorst f94114a88d dsound: Make sure secondary_remainder and buflen are aligned to primary buffer in mixer. 2007-07-27 12:22:27 +02:00
Maarten Lankhorst 2b8a1815e6 dsound: Remove some more unused variables. 2007-07-09 12:15:40 +02:00
Maarten Lankhorst f13f48876c dsound: Clean up some unused variables. 2007-07-06 19:28:59 +02:00
Francois Gouget 2f0ca64dac dsound: Add missing '\n' to Wine trace. 2007-06-26 12:12:04 +02:00
Maarten Lankhorst a7d6ed8ea6 dsound: Simplify mixing by removing remixing support, and fix its waveout breakage.
Based on a patch by Peter Dons Tychsen.
2007-06-22 12:23:18 +02:00
Andrew Talbot 1e4c97175e dsound: Exclude unused headers. 2007-05-03 14:23:53 +02:00
Andrew Talbot 824c9c8ee6 dsound: Constify some variables. 2007-04-30 12:32:30 +02:00
Maarten Lankhorst c38bcb96d7 dsound: Use an inline for ring buffer pointer difference calculation. 2007-02-22 11:26:42 +01:00
Maarten Lankhorst 0036298a14 dsound: Add some comments from earlier patch that makes code a little better understandable. 2007-02-22 11:25:35 +01:00
Michael Stefaniuc 26bd2ec9c3 dsound: Win64 printf format warning fixes. 2006-11-13 12:49:04 +01:00
Michael Stefaniuc 0f08667c8a dsound: Fix the declaration/definition of DSOUND_timer(). 2006-11-13 12:48:27 +01:00
Alexandre Julliard 179a4e0a2e dsound: Make some functions static. 2006-08-02 13:26:14 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Robert Reif e49a5c22fb dsound: Refactor playback.
Replace references of IDirectSoundImpl with DirectSoundDevice to
remove one level of indirection and remove the problem of a three
object circular reference.
2006-01-06 12:35:20 +01:00
Davin McCall a9a689c592 PhaseCancel subtracts secondary buffer from primary buffer, not the
other way around.
2005-11-01 10:18:55 +00:00
Robert Reif 6727c52f3b Include winuser.h so the code compiles cleanly on windows using
windows headers.
2005-10-17 09:24:50 +00:00
Alex Villacís Lasso 5577cc739d Correction to earlier assertion patch to allow for buf_mixpos ==
buflen in non-looping case, fixes looping of one-off mixed samples
introduced by previous patch.
2005-08-03 19:13:58 +00:00
Alex Villacís Lasso 7840becd3f Prevent dsb->buf_mixpos from ever remaining past dsb->buflen even if
not in DSBPLAY_LOOPING case, to prevent assertion failure in
DSOUND_MixInBuffer.
2005-08-02 09:47:32 +00:00
Robert Reif 0043504155 Fix a typo. 2005-06-21 09:43:29 +00:00
Robert Reif e5208ca7a3 Fix roundoff error to prevent negative length. 2005-06-20 14:12:03 +00:00
Robert Reif a2f1fd3aca Add multiple DIRECTSOUND object support (multiple sound cards can play
at the same time).
Fix CoCreateInstance when no sound card is present.
Fix create bug found by Mike Hearn.
2005-05-31 09:31:37 +00:00
Robert Reif 70fe39e42c Remove dead code and redundant variables from DSOUND_CalcPlayPosition
and callers.
2005-05-09 09:23:54 +00:00
Robert Reif 1e17a784c6 Fix block align error message to show length before fix up. 2005-03-19 17:09:33 +00:00
Robert Reif 7f6536c504 Change some global variable names.
Cleanup usage of global dsound variable to not use local variable of
same name.
Almost ready to add support for more than one sound card at the same
time.
2005-03-15 15:40:35 +00:00
Robert Reif 2a052044fe Use nBlockAlign rather than calculating it.
Add a buffer length alignment error message.
2005-02-25 19:16:57 +00:00
Robert Reif c50038542a Some block align cleanups. 2005-02-16 16:26:13 +00:00
Robert Reif 0e0544aa72 Signed/unsigned fix and code cleanup. 2005-02-10 17:10:54 +00:00
Robert Reif 364c0d53f9 Remove unused includes. 2005-01-24 13:31:27 +00:00
Robert Reif ef847a0303 Use Windows memory functions. 2005-01-24 12:40:45 +00:00
Robert Reif b0d74e6bf3 Fixed memory leak in mixer code. 2005-01-24 11:27:05 +00:00
Hans Leidekker fe442b21f7 Fix signed/unsigned comparison warnings. 2004-09-08 01:23:57 +00:00
Robert Reif 1d785b85c2 Consolidate secondary buffer list processing and locking.
Two new functions DSOUND_AddBuffer and DSOUND_RemoveBuffer
have been added and the locking has been moved into these functions.
Renamed IDirectSound lock to buffer_list_lock.
Removed redundant test for IID_IDirectSoundNotify and
IID_IDirectSoundNotify8 because they are the same.
Removed check for invalid buffers on list because that shouldn't
happen anymore because of fixed 3d buffer reference counting.
Minor code cleanups.
2004-09-07 19:32:21 +00:00
Robert Reif dfe3c1c579 Allocate wave format structure dynamically based on format.
Remove format checks to allow driver to decide if format supported.
Code cleanups.
2004-08-18 00:30:37 +00:00
Robert Reif 101599e902 Speed up mixing and unmixing by moving sample size and buffer wrap
tests to outside the loop.  The code is not as compact or pretty but
it should be faster.
2004-08-12 20:01:32 +00:00
Gerald Pfeifer 0ba37e23d9 Avoid using round(), which is unportable. 2004-08-02 18:47:09 +00:00
Francois Gouget 18aeb90165 Fix the volume and balance of primary buffers so it is the system's
volume and balance, like on Windows.
2004-07-23 19:06:31 +00:00
Robert Reif 370a18f786 Reduce the use of the dsound global variable by passing address to
functions.
2004-01-12 21:02:22 +00:00
Robert Reif 99b0e8fa66 Added volume and pan support to primary buffers.
Added more property set support.
2003-09-19 00:10:51 +00:00
Alexandre Julliard e37c6e18d0 Fixed header dependencies to be fully compatible with the Windows
headers (with help from Dimitrie O. Paun).
2003-09-05 23:08:26 +00:00
Robert Reif 5ec32cecf2 Added SecondaryBuffer and DirectSoundCaptureNotify COM objects to get
reference counting right.
2003-09-01 23:58:43 +00:00
Robert Reif 9dacf206fe 3D buffer and listener reference counts should be fixed.
3D sound now plays in 3D.
COM interfaces should be correct for buffers and 3D stuff. The COM
interface is broken on notifications but I will fix that next.
Fixed the bug when closing and opening the same or another sound
device quickly.
Fixed some locking but there is a lot of work left yet.
2003-06-27 22:22:15 +00:00
Robert Reif a4ed8e7740 - make parameter checking and error notification consistent
- propagate driver and local function errors where needed
- fix error returns where pointer is given for returned data
- add 3d listener to primary buffer when needed
- copy 3d part of buffer when duplicated
- fix bug when primary buffer is reopened with smaller buffer
- loosen requirements on caps data size check
- set caps for emulated mode based on actual driver caps
2003-05-22 03:39:13 +00:00
Robert Reif 772539a84a Move all tests to outside the loop when setting volume.
Add traces to functions.
2003-05-02 21:23:16 +00:00
Robert Reif abde7d0acf Reversed relationship between buffers and notifies.
Fixed notify reuse bug.
Minor documentation and error message cleanup.
2003-05-02 20:16:48 +00:00
Alexandre Julliard c2ebe1ff93 Removed uses of the non standard ICOM_VTBL macro. 2003-04-10 18:17:34 +00:00
Jerry Jenkins 5f4e4a5094 Align data to proper size. 2003-04-07 23:18:31 +00:00
Ove Kaaven 6fb0277699 Somewhat more reliable dsound position notifications. 2003-03-17 21:23:12 +00:00
Robert Reif 89b469fefe Added support for multiple direct sound devices. 2003-03-15 00:54:11 +00:00
Robert Reif 8c2ec131a8 Added a configuration option for setting the hardware acceleration
level just like the direct sound control panel app.
More work on the full duplex interface so the compile warning is no
longer generated.  Full duplex interface is still stubbed out.
Moved full duplex mixer reset fix into wineoss driver where it
belongs.
Added some more locking fixes.
Capture and full duplex are now stable.
2003-03-06 22:46:34 +00:00
Robert Reif 15cc17fbcf Fixed code to handle full duplex properly.
Added support for capture driver (disabled).
Fixed direct sound capture test to handle notifications properly.
2003-03-04 02:12:34 +00:00
Francois Gouget 8e9dcb6655 Use the same 8/16bit conversion routines as in pcmconverter.c.
Reorder the two ifs in the first part of cp_fields to simplify the
code.
2003-01-16 00:20:07 +00:00
Francois Gouget 8325deaa33 Fix latent deadlock in DSOUND_callback. 2003-01-11 20:53:43 +00:00
Alexandre Julliard b34fb35b31 Fixed warnings caused by conversion to -DSTRICT. 2002-10-18 23:48:57 +00:00
Patrik Stridvall 9c1de6de30 Moved all the content of the DDK files ntdef.h and ntddk.h to
winternl.h.
2002-09-12 22:07:02 +00:00
Patrik Stridvall d016f819f1 Added include protection for unistd.h and sys/time.h. 2002-08-17 00:43:16 +00:00
Ove Kaaven 935e3df35c Support DirectSound 8 interfaces. Split interface implementations into
separate files. Split primary buffer and secondary buffer interfaces
into separate implementations. Made the primary buffer state part of
the dsound object, so primary buffer objects can be created and
refcounted independently. Made the interfaces follow COM aggregation
rules more closely. Converted the dsound critical section to a R/W
lock to improve potential remixing concurrency. Fixed various bugs and
refcounting issues.
2002-06-13 19:15:06 +00:00