Commit Graph

164 Commits

Author SHA1 Message Date
Andrew Eikum 7dce1418ff dsound: Base fragment size off of the MMDevice's period. 2012-05-14 19:58:41 +02:00
Andrew Eikum 1053bfb48d dsound: Express buffer positions in terms of bytes, not fragments. 2012-05-14 19:58:32 +02:00
Andrew Eikum f0be44c82d dsound: Don't destroy primary buffer until device is released. 2012-05-09 17:49:33 +02:00
Alexander E. Patrakov 275dfb83f2 dsound: Added a windowed-sinc resampler. 2012-05-08 09:29:47 +02:00
Andrew Eikum 4354be123c dsound: Don't derive the secondary position from the primary position. 2012-05-02 12:00:02 +02:00
Andrew Eikum f393a98a8a dsound: Convert from fixed to floating point. 2012-05-02 11:59:58 +02:00
Alexander E. Patrakov 93a0ca7c6c dsound: Clean up channels. 2012-05-01 19:16:23 +02:00
Alexander E. Patrakov f88f3d4149 dsound: Replace convert() functions with get() and put(). 2012-05-01 19:15:49 +02:00
Michael Stefaniuc 84d5317302 dsound: Remove the now obsolete IDirectSoundBufferImpl_Destroy(). 2012-01-20 13:34:20 +01:00
Michael Stefaniuc c7f5f10aab dsound: Merge IDirectSoundNotify into the secondary buffer object. 2012-01-20 13:33:33 +01:00
Michael Stefaniuc e0d81e55e2 dsound: Merge IDirectSound3DBuffer into the secondary buffer object. 2012-01-19 21:08:49 +01:00
Michael Stefaniuc 48ca5924b4 dsound: Merge IKsPropertySet into the secondary buffer object. 2012-01-17 11:53:19 +01:00
Michael Stefaniuc 37df4671cb dsound: Merge IDirectSound3DListener into the primary buffer object. 2012-01-16 12:45:33 +01:00
Michael Stefaniuc 13a4b03b44 dsound: Merge IDirectSoundNotify into the capture buffer object. 2012-01-12 12:38:41 +01:00
Michael Stefaniuc 3dac0e5a4f dsound: Add an extra refcount for the capture buffer object. 2012-01-12 12:38:34 +01:00
Michael Stefaniuc f1d7414971 dsound: COM cleanup for the IDirectSoundCaptureBuffer8 iface. 2012-01-12 12:38:21 +01:00
Alexander E. Patrakov 663bc47602 dsound: Always resample buffers in mixer thread. 2011-12-29 17:56:48 +01:00
Francois Gouget c64ce9d0ff dsound: Remove mmErr(). It is not used anymore. 2011-12-06 17:52:54 +01:00
Andrew Eikum cec8e0d73a dsound: Remove a few unused variables. 2011-10-05 17:31:27 -05:00
Andrew Eikum 6c33e87259 dsound: Eliminate leftover driver structures. 2011-09-28 10:59:31 +02:00
Andrew Eikum 8856ea79f3 dsound: Reimplement PropertySet on mmdevapi. 2011-09-27 16:53:59 +02:00
Andrew Eikum 3735ecac21 dsound: Reimplement capturing devices on mmdevapi. 2011-09-27 16:53:59 +02: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
Michael Stefaniuc a2bc634eaa dsound: Handle primary buffers in IDirectSoundBufferImpl_SetFormat. 2011-08-31 19:43:06 +02:00
Michael Stefaniuc 3747fb74a1 dsound: Move the primary buffer description into the buffer object. 2011-08-31 19:43:06 +02:00
Michael Stefaniuc c0565143f9 dsound: Don't delete the primary buffer if a sub iface is still in use. 2011-08-31 19:43:05 +02:00
Michael Stefaniuc ffb51208e9 dsound: Use the same struct for the primary buffer object as for the secondary. 2011-08-31 19:43:05 +02:00
Michael Stefaniuc 6d7c38256f dsound: Fix refcounting for the secondary buffer object.
This fixes a regression introduced in 6b64e0090c.
2011-08-26 11:31:59 +02:00
Michael Stefaniuc 6b64e0090c dsound: Kill SecondaryBufferImpl with extreme prejudice. 2011-08-24 12:14:46 +02:00
Michael Stefaniuc 7da80d1f01 dsound: Basic COM cleanup for the IDirectSoundBuffer8 iface. 2011-08-24 12:14:46 +02:00
Marcus Meissner 0615969f2b dsound: Mark internal symbols as having hidden visibility. 2011-04-26 15:31:27 +02:00
Maarten Lankhorst 4429257358 dsound: COM cleanup property sets. 2011-04-08 16:49:51 +02:00
Owen Rudge d6f3ca9589 dsound: Add support for 32-bit IEEE float buffers. 2011-01-20 17:50:04 +01:00
Maarten Lankhorst ef0a0d8b86 Revert "dsound: Only initialize one guid for capture and renderer."
Reverts b474649e0e. Some games use
pointers to the guid rather than copying the guid even after the
enumeration function returns. Allocating on the stack breaks those
games.
2010-01-06 09:54:18 +01:00
Maarten Lankhorst b474649e0e dsound: Only initialize one guid for capture and renderer. 2009-12-10 15:41:25 +01:00
Francois Gouget ff0717766c dsound: Make DSOUND_PrimarySetFormat() static. 2009-12-02 14:19:47 +01:00
Francois Gouget 5b5f00d552 dsound: Make some capture functions static. 2009-12-02 14:19:44 +01:00
Maarten Lankhorst c9b70ddf7e dsound: Remove directsound interface in duplex. 2009-11-30 16:24:14 +01:00
Maarten Lankhorst a8f587e8de dsound: Move duplex definitions to duplex.c. 2009-11-16 14:50:30 +01:00
Jörg Höhle dc3471ca0e dsound: Enforce invariant about BlockAlign and nAvgBytesPerSec. 2009-10-06 16:13:17 +02: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
Andrew Talbot 62d6a4e9f7 dsound: Declare some variables static. 2009-01-03 15:36:08 +01:00
Maarten Lankhorst 6b6b8d9bfa dsound: 64-bit pointer fixes. 2008-11-26 14:15:50 +01:00
Maarten Lankhorst a4a9d50dd9 dsound: Fix volume and panning for primary buffer.
Fixes failing dsound tests in wine.
2008-10-06 13:08:46 +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
Maarten Lankhorst 4d1129f785 dsound: Use a 2 stage mixing/normalization for sound. 2007-11-09 12:24:06 +01:00
Maarten Lankhorst a938f69360 dsound: Add mixing and normalization functions. 2007-11-09 12:23:54 +01:00
Maarten Lankhorst fa3663d6c7 dsound: Add support for 24/32 bits input sound buffers. 2007-11-09 12:20:20 +01:00
Maarten Lankhorst 3bafbb22b8 dsound: Use smaller buffers for wavein capture. 2007-10-01 12:42:42 +02:00
Maarten Lankhorst 5d0b1fabd3 dsound: Update DSOUND_PrimarySetFormat to follow flags and return values more precisely. 2007-08-27 19:28:03 +02:00
Maarten Lankhorst 7519326d03 dsound: Add a function to (re)open sound device to avoid code duplication. 2007-08-27 19:27:47 +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 7fcce036da dsound: Add a registry setting for hel buffer length. 2007-07-31 22:19:57 +02:00
Maarten Lankhorst 3b9877fa14 dsound: Constify DSOUND_CheckEvent. 2007-07-30 23:37:58 +02:00
Maarten Lankhorst bfa05bf232 dsound: Remove some more unused variables. 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 976f56d6c0 dsound: Simplify IDirectSoundBufferImpl_GetCurrentPosition. 2007-07-09 12:15:58 +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
Maarten Lankhorst e28da99e4c dsound: Tune some parameters for alsa waveout. 2007-06-22 12:23:24 +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
Maarten Lankhorst 6e9276e970 dsound: Primary buffer isn't an IDirectSoundBuffer8. 2007-05-14 14:29:33 +02:00
Michael Stefaniuc 0f08667c8a dsound: Fix the declaration/definition of DSOUND_timer(). 2006-11-13 12:48:27 +01:00
Robert Reif 595d6aa6fb dsound: Class factory cleanup.
Consolidate all class factories into a single implementation.
Fixes a problem discovered by oleview.
2006-08-18 12:04:49 +02:00
Alexandre Julliard 179a4e0a2e dsound: Make some functions static. 2006-08-02 13:26:14 +02:00
Alexandre Julliard bbeeea4b88 dsound: Make the virtual table functions static where possible. 2006-06-10 11:57:48 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Robert Reif 44b7760e6a dsound: Set default primary buffer sample rate and bits per sample.
Programs that are written specifically for 2000 and xp don't bother to
set the primary buffer format because it's a noop.  However wine is
patterned after win9x and DirectX 7 or earlier which has a real
primary buffer and expects the program to change the primary buffer
format if necessary.
2006-04-08 15:48:59 +02:00
Robert Reif 27e591959f dsound: Add full duplex support. 2006-01-17 16:13:58 +01:00
Robert Reif 3a4e11cd24 dsound: Convert IDirectSoundImpl from a COM class to a regular class
and move most of the COM functions to the DirectSoundDevice class.
2006-01-17 16:10:15 +01:00
Robert Reif eb919b5263 dsound: Make dumpCooperativeLevel global.
Remove extern from some function prototypes.
2006-01-16 20:39:52 +01:00
Robert Reif 34ec3a633a dsound: Make some capture functions global. 2006-01-16 20:39:14 +01:00
Robert Reif 52e384f9fb dsound: Rename some functions, make some functions global, and move
some code around.
2006-01-14 17:06:52 +01:00
Robert Reif 2d82fc42f0 dsound: Add DSOUND_PrimarySetFormat and use it to set primary format. 2006-01-14 17:06:22 +01: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
Robert Reif 5070268711 dsound: Capture refactoring.
Move initialization code from DirectSoundCapture to
DirectSoundCaptureDevice.
Make DirectSoundCaptureBuffer directly reference
DirectSoundCaptureDevice rather than DirectSoundCapture to eliminate
one level of indirection.
Rename DSOUND_CreateDirectSoundCaptureBuffer to
IDirectSoundCaptureBufferImpl_Create to be consistent.
2006-01-05 13:37:15 +01:00
Robert Reif 7643df49d7 dsound: Capture cleanup.
Move code and function prototypes around to eliminate forward
declarations.  No code is changed.
2006-01-04 14:49:34 +01:00
Robert Reif 0265676a27 dsound: Remove WINAPI from internal functions. 2006-01-03 17:32:50 +01:00
Robert Reif 0c488e76b1 Remove unused variable from IDirectSoundFullDuplexImpl.
Move DirectSoundFullDuplexCreate to get rid of forward declarations.
2005-10-27 10:18:51 +00:00
Robert Reif 669b79b8f5 Change secondary buffer variable name to secondary.
Fix AddRef and Release to use proper class.
2005-10-19 19:21:38 +00:00
Mike McCormack 0791d06215 Interlocked LONG* gcc warning fixes. 2005-07-12 19:21:36 +00:00
Robert Reif 5c8fb16893 Finish DirectSoundCapture/DirectSoundCapture8 split.
Add tests to verify split.
2005-06-04 09:38:14 +00:00
Dmitry Timoshkov b67da5b946 Make more of the OLE interface vtables const. 2005-06-01 19:57:42 +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 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 b0d74e6bf3 Fixed memory leak in mixer code. 2005-01-24 11:27:05 +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 7bf4eee7ad Remove wine specific DRV_QUERYDSOUNDGUID message and calculate it in
dsound.dll (like in 2k/xp).
2004-08-20 20:01:31 +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
Alexandre Julliard 0467ce9fd7 Get rid of the non-standard ICOM_VFIELD macro. 2004-08-12 19:52:49 +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 02a8ab2fee Save enumerated GUIDs in a global array so they persist after
enumeration.
White space cleanup.
Add tests for opening default devices.
2004-07-21 03:23:13 +00:00
Robert Reif 3ce9c5f4b8 Do initialization to match windows behavior (with test). 2004-07-19 20:06:22 +00:00
Robert Reif 605cc1b029 Remove DirectSound reference counts by buffers and add Destroy
functions to buffer components and DirectSound to allow proper
destruction even with outstanding references.
Remove trailing white space.
Add tests for proper release even with active buffers.
2004-07-13 23:35:09 +00:00
Robert Reif 31f817b6f9 Separated DirectSoundCreate8 into two functions and added a
IDirectSound implementation.
Added proper COM behavior for QueryInterface for IDirectSound and
IDirectSound8.
Fixed a bug in the dsound.h header file for IDirectSound8
CreateSoundBuffer and DuplicateSoundBuffer.
Added new tests for proper COM behavior and enables some commented out
code for tests that work on windows.  Added new tests for
IDirectSound8.
2004-07-04 00:13:44 +00:00
Robert Reif 14a7c6ddca Remove unused lock. 2004-03-17 01:44:15 +00:00