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
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
7dd637467a
Added some missing defines and a struct.
...
Fixed some const * arguments.
2004-01-09 22:06:54 +00:00
Robert Reif
93d3492f7f
Make capture more reliable by submitting all buffers before start.
...
Added support for non pcm formats.
Added more property set support.
2003-10-08 22:35:26 +00:00
Robert Reif
e9ebbfc0ff
Now that reference counting is correct, there is no need to check if
...
the base object goes away.
2003-09-02 00:56:14 +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
b805f0f1b7
Split property sets into two types: buffer and private.
2003-08-20 18:18:23 +00:00
Robert Reif
f5080c86e5
Added class factories for DirectSoundCapture, DirectSoundFullDuplex
...
and DirectSoundPrivate.
Added error checking to QueryInterface and CreateInterface.
Added some more functionality to property sets.
2003-08-06 22:57:24 +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
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
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
Robert Reif
5be7f69d72
Added support for direct sound capture and a real direct sound capture
...
driver. Capture now works with some skipping. Full duplex does not but
I will be working on that next.
2003-02-15 00:01:17 +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