Commit Graph

44 Commits

Author SHA1 Message Date
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