Commit Graph

725 Commits

Author SHA1 Message Date
Maarten Lankhorst c3ebd3652a dsound: Acceleration fixes for wavein emulation. 2007-08-06 13:56:40 +02:00
Maarten Lankhorst abe8c127d9 dsound: Make timer more robust. 2007-08-06 13:56:34 +02:00
Maarten Lankhorst 3f762d5d0b dsound: Sound acceleration fixes. 2007-08-06 13:56:20 +02:00
Michael Stefaniuc efe4573bc8 dsound: Remove redundant NULL check before HeapFree. Found by Smatch. 2007-08-06 12:18:08 +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 34893a914b dsound: Silence the IDirectSoundBuffer_Initialize warnings. 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 de9cecaaa8 dsound: Reset state when stopping device. 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 0c3cd2a0e4 dsound: Some cosmetic changes. 2007-07-27 12:23:27 +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 976f56d6c0 dsound: Simplify IDirectSoundBufferImpl_GetCurrentPosition. 2007-07-09 12:15:58 +02:00
Maarten Lankhorst a6ab4c51cf dsound: Fix division by zero in DSOUND_Calc3DBuffer. 2007-07-09 12:15:45 +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 c45d4f77c6 dsound: Revert "dsound: Disable property sets if hardware doesn't support it.". 2007-07-06 19:28:53 +02:00
Romain Iehl 684a121aed dsound: Correct field access. 2007-07-06 18:19:40 +02:00
Romain Iehl 8de6b7da40 dsound: Simplify the calculation of sound attenuation due to distance. 2007-07-06 18:19:34 +02:00
Romain Iehl 3a8ae53de4 dsound: Fix bug preventing correct calculation of the sound parameters
of a 3Dbuffer, when an application calls CommitDeferredSettings after
the 3DBuffer has been released.
2007-07-06 18:15:57 +02:00
Francois Gouget a3317a5c01 Assorted spelling fixes. 2007-07-05 19:56:34 +02:00
Maarten Lankhorst 6d97123536 dsound: Fix calcplayposition to handle mixed amount > buffer length better. 2007-06-29 18:58:13 +02:00
Maarten Lankhorst f4d5f127dd dsound/winealsa: Remove writelead for alsa directsound. 2007-06-28 12:16:14 +02:00
Francois Gouget 2f0ca64dac dsound: Add missing '\n' to Wine trace. 2007-06-26 12:12:04 +02:00
Alex Villacís Lasso 1a23836f91 dsound: Reset device playpos/mixpos on buflen change. 2007-06-26 11:54:51 +02:00
Alex Villacís Lasso f2626bab14 dsound: Make test recover from failure to preserve primary buffer length after SetFormat(). 2007-06-26 11:53:16 +02:00
Michael Stefaniuc 2323e79e36 dsound: Fix missing unlock on an error path. Found by Smatch. 2007-06-25 11:43:44 +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 9591246002 dsound: Give rougher estimates for fraglen to satisfy alsa. 2007-06-22 12:20:00 +02:00
Maarten Lankhorst 1081a9b144 dsound: Use TIME_KILL_SYNCHRONOUS on sound timer. 2007-06-14 13:20:34 +02:00
Maarten Lankhorst faa29e9238 dsound: Unset variable on failure in IKsBufferPropertySetImpl_Create. 2007-06-12 11:18:46 +02:00
Maarten Lankhorst 3e1fcc0eb7 dsound: Disable property sets if hardware doesn't support it. 2007-06-04 12:56:13 +02:00
Maarten Lankhorst 13af056628 dsound: Recalculate 3d buffer on SetVolume. 2007-06-04 12:55:47 +02:00
Maarten Lankhorst 909ed9937a dsound: Fix buffer caps. 2007-06-04 12:55:41 +02:00
Francois Gouget 24b315c51f dsound/tests: Fix the Visual C++ double to float conversion warnings. 2007-05-29 13:47:06 +02:00
Maarten Lankhorst c83fd812f1 dsound: Fix stupid mistake. 2007-05-29 11:55:14 +02:00
Maarten Lankhorst 2360358944 dsound: Block align SetCurrentPosition and add test for it. 2007-05-25 19:31:05 +02:00
Robert Reif 91d580433c dsound: Add missing interface ID. 2007-05-23 14:35:05 +02:00
Maarten Lankhorst 2e9fa34d67 dsound: IDirectSound_Compact should return DS_OK on priolevel >= DSSCL_PRIORITY. 2007-05-15 12:20:00 +02:00
Maarten Lankhorst 6e9276e970 dsound: Primary buffer isn't an IDirectSoundBuffer8. 2007-05-14 14:29:33 +02:00
Andrew Talbot 1e4c97175e dsound: Exclude unused headers. 2007-05-03 14:23:53 +02:00
Rob Shearman 543a7d8f2d dsound: Implement QueryInterface for KsPropertySet objects. 2007-04-30 12:33:12 +02:00
Rob Shearman ade2984e03 dsound: Implement QueryInterface for the class factory objects. 2007-04-30 12:33:07 +02:00
Andrew Talbot 824c9c8ee6 dsound: Constify some variables. 2007-04-30 12:32:30 +02:00
Maarten Lankhorst 364e65a872 dsound: Don't deadlock in capture because of callback. 2007-04-23 14:05:52 +02:00
Maarten Lankhorst 836776ae4f dsound: Make sure we're holding the lock on Drop And Stop. 2007-04-23 14:05:42 +02:00
Andrew Riedi 447d5c219b dsound: Change a couple DPRINTF's to TRACE's 2007-03-29 21:01:14 +02:00
Andrew Talbot 6eba82d418 dsound: Replace inline static with static inline. 2007-03-20 13:00:51 +01:00
Jan Zerebecki 4c4821e305 dsound: Conform critical section DebugInfo names. 2007-03-12 13:40:22 +01:00
Stefan Huehner 51a7ca3440 Change some functions arguments from () -> (void). 2007-03-12 12:25:31 +01:00
Tomas Carnecky 9b4f99782e dsound: Update prototypes for IDirectSoundBuffer::Lock/Unlock. 2007-03-08 21:30:54 +01: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
Robert Reif 2e44a3b2a2 dsound: Fix tests for old versions of windows. 2007-01-16 11:19:30 +01:00
Francois Gouget 3327c5f6ff dsound/tests: Replace some '#if 0's with 'if (0)'s. 2007-01-12 11:25:11 +01:00
Francois Gouget 42d25ef95d dsound/tests: The tests link with dsound.dll so use GetModuleHandle() instead of LoadLibrary(). 2007-01-12 11:25:06 +01:00
Francois Gouget e48d86308d dsound/tests: Replace some '#if 0's with 'if (0)'s. 2007-01-12 11:24:49 +01:00
Michael Stefaniuc 3cf9f84561 dsound: Remove stray '\' at end of lines. 2007-01-09 12:03:46 +01:00
Andrew Talbot 6a9d6ef275 dsound: Remove unused function. 2007-01-09 12:03:38 +01:00
Alexandre Julliard 6addb22017 dsound: The dsconf.h GUIDs are now in libdxguid. 2007-01-08 22:01:56 +01:00
Patrik Stridvall 6e062a4e08 dsound: The GUID:s defined in dsconf.h should be exported by dxguid. 2007-01-08 21:14:31 +01:00
Marcus Meissner f0280cbd1e made functions and variables static in some testcases. 2006-12-11 12:18:29 +01:00
Dmitry Timoshkov 616b65532b dsound: Make some data const. 2006-11-29 12:44:40 +01:00
Francois Gouget cc1cb0ad8e dsound/tests: Remove unneeded NONAMELESS* macros. 2006-11-24 11:48:50 +01:00
Francois Gouget 1ccf944900 Assorted spelling fixes. 2006-11-13 13:01:53 +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
Francois Gouget 30e44c85c8 Assorted spelling fixes. 2006-11-07 15:25:24 +01:00
Michael Stefaniuc 15765dd953 The Data1 member of the GUID struct needs to be an unsigned int too for Win64 compatibility. 2006-10-16 10:53:04 +02:00
Michael Stefaniuc 65aac34c56 dsound/tests: Win64 printf format warning fixes. 2006-10-10 11:56:56 +02:00
Francois Gouget be87fe8c7c dsound: Don't use state.buffer_size before it has been initialized. 2006-09-29 17:53:31 +02:00
Michael Stefaniuc 85ce5117c5 Add a WINE_NO_LONG_INT define to many makefiles to ease the transition of DWORD/LONG/ULONG from long to int. 2006-09-29 16:08:30 +02:00
Alexandre Julliard 32ab895e46 makefiles: Generate the dependencies line to avoid some code duplication. 2006-09-14 09:38:16 +02:00
Alexandre Julliard 5cf75e615a makefiles: Only run test and documentation targets in directories that need them. 2006-08-28 13:37:44 +02:00
Robert Reif 02bd4ad437 dsound: Remove unused parameter from propset functions. 2006-08-23 11:58:38 +02:00
Robert Reif 425608a120 dsound: Add class factory tests. 2006-08-18 12:04:54 +02: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
Andrew Talbot 70642e2511 dsound/tests: Write-strings warning fix. 2006-07-31 21:57:54 +02:00
Alexandre Julliard 77dc0d9be5 .gitignore: Added wildcards to ignore generated resource files. 2006-07-10 21:39:00 +02:00
Alexandre Julliard 0fa8baafcb make_dlls: Recursively ignore .ok files in all tests directories. 2006-07-10 21:26:50 +02:00
Alexandre Julliard edd100b899 make_dlls: Recursively ignore testlist.c in all tests directories. 2006-07-10 21:19:42 +02:00
Alexandre Julliard 5258e061dc make_dlls: Ignore generated import libraries from the top-level .gitignore. 2006-07-10 20:55:58 +02:00
Alexandre Julliard cc2b3b48e6 Take advantage of the recursive nature of .gitignore for Makefile entries.
Prefix other entries with '/' to make them non-recursive.
2006-07-10 20:47:54 +02:00
Paul Vriens 8f143f190c Use the return value of register_key_guid. 2006-06-30 21:08:07 +02:00
Alexandre Julliard bc99ac09d3 dsound: Don't use sizeof in traces to avoid printf format warnings. 2006-06-13 14:10:32 +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
Vitaliy Margolen 4054c06e55 directx: Update file versions to dx9c (compared to win2k). 2006-05-22 11:32:17 +02:00
Robert Shearman 74407105d2 Check the return value from register_key_guid in all the DLL registering code. 2006-05-10 19:38:04 +02:00
Robert Reif a15ef7b18a dsound: Add DirectSoundBuffer_Lock tests. 2006-05-05 17:29:23 +02:00
Robert Reif b06a06090a dsound: Check DirectSoundBuffer_Lock parameters.
Check DirectSoundBuffer_Lock parameters and return an error (like 
Windows) rather than fixing up the parameters.
2006-05-05 17:29:13 +02:00
Robert Reif 1f882cd68d dsound: Fix 2 bugs in ds3d tests.
Fix 2 bugs in the error paths of the ds3d.c test (coverity).
2006-04-10 12:22:08 +02:00
Robert Reif 208b0c2e72 dsound: Remove NULL This pointer checks. 2006-04-08 15:53:00 +02:00
Robert Reif 2c4c204371 dsound: Remove unnecessary NULL pointer check. 2006-04-08 15:50:08 +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 ba62608996 dsound: Fix capture test.
Remove bogus release of NULL pointer code found by Coverity.
2006-04-07 20:01:40 +02:00
Robert Reif c460d9becf dsound: Add info to failed tests.
Print format for failed SetFormat calls.
2006-03-15 11:30:17 +01:00
Robert Reif 919ee6b699 dsound: Fix duplex create bug. 2006-02-28 12:40:16 +01:00
Robert Reif 64841caba8 dsound: Fix duplex test. 2006-02-09 12:08:05 +01:00
Robert Reif 6255936c83 dsound: Duplex test fix. 2006-01-25 13:15:25 +01:00
Robert Reif c82a63ba97 dsound: Primary buffer size change tests.
It looks like Windows doesn't change the primary buffer length when
changing formats so make the tests fail now.
This means the current ALSA implementation is broken when hardware
acceleration is set to full and the primary buffer format is changed.
2006-01-17 16:19:54 +01:00
Robert Reif 03b8fca7e2 dsound: Add full duplex tests. 2006-01-17 16:19:14 +01: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 54cf8ea1ac dsound: Add primary buffer change tests.
Add tests to figure out whether Windows can change the primary buffer
capabilities after setting the buffer format. Based on a patch by Alex
Villacís Lasso.
2006-01-11 12:12:46 +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 b2d604a9da dsound: Fix double free bug in tests.
Fix double free in tests.  Only happens in interactive mode when
testing duplicated 3D buffers.
2006-01-06 12:16:41 +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 88ff432164 dsound Add uninitialized check. 2006-01-03 12:11:27 +01:00
Alexandre Julliard 0ec7e1a591 Renamed all .cvsignore files to .gitignore. 2005-11-26 13:10:33 +01:00
Robert Reif efff88b834 Handle failure on Windows 95 properly.
Make two functions available to all files.
Make format_string() const correct.
2005-11-18 12:04:36 +00:00
Francois Gouget 0edbaf7e80 Remove spaces before '\n' in traces. 2005-11-10 12:14:56 +00: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 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
Robert Reif 6727c52f3b Include winuser.h so the code compiles cleanly on windows using
windows headers.
2005-10-17 09:24:50 +00:00
Mike O'Regan 5fd4aa6fc4 Tests commented out and FIXME-ed long ago now pass. 2005-10-11 19:57:17 +00:00
Robert Reif 57444565e6 Fix PrimaryBufferImpl pointer to deleted DirectSoundImpl. 2005-10-11 19:26:37 +00:00
Robert Reif 0966d61344 DirectSoundDevice reference count cleanup. 2005-10-10 10:29:13 +00:00
Robert Reif b6dd5de03f Fix dsound8 test to deal with an installed but unregistered
IDirectSound8.
2005-10-10 10:27:50 +00:00
Alexandre Julliard 7e22be4d84 We are no longer generating .dbg.c files. 2005-09-29 10:35:58 +00:00
Robert Reif 594b7f26e4 Fix capture test to not fail when IDirectSoundCapture class is not
registered.
2005-09-23 10:05:40 +00:00
Marcus Meissner bd7ec9aca5 The last argument to MultiByteToWideChar is wide character count and
not the buffer size in bytes. Fixed all places where it was wrong.
2005-09-12 22:07:53 +00:00
Alexandre Julliard 261e376495 Fixed a number of pointer to integer conversions that wouldn't work
right on a 64-bit platform.
2005-09-12 15:14:06 +00:00
Alexandre Julliard c6b005ac69 Fixed some more traces to use the right printf format and avoid
typecasts.
2005-09-12 14:12:46 +00:00
Alexandre Julliard f8ee161a1b Fixed some traces to use the right printf format and avoid typecasts. 2005-09-12 10:30:05 +00:00
Alexandre Julliard 20a1a203c6 Use a more portable scheme for storing the name of a critical
section.
2005-09-09 10:19:44 +00:00
Alexandre Julliard 7f67b35a0d Replace a few more direct lpVtbl accesses by the proper macros. 2005-09-07 13:28:25 +00:00
Mike McCormack 6dc69f5f54 Fix gcc 4.0 warnings. 2005-09-02 12:26:21 +00:00
Mike McCormack 4a5378efcd Fix some gcc 4.0 warnings. 2005-08-30 08:56:35 +00:00
Vincent Béron 7160af007c Uniformize DllMain TRACEing across dlls. 2005-08-15 10:48:51 +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
Stefan Huehner aed3fb612d Fix some sign-compare warnings by choosing correct datatypes. 2005-07-15 16:34:04 +00:00
Stefan Huehner 06822b8977 Fix some write-strings warnings. 2005-07-15 09:58:36 +00:00
Mike McCormack 0791d06215 Interlocked LONG* gcc warning fixes. 2005-07-12 19:21:36 +00:00
Mike McCormack 257c337c19 gcc 4.0 -Wpointer-sign fixes (Reg* functions). 2005-07-07 12:08:42 +00:00
Stefan Huehner 863a4b1488 Fix some more -Wstrict-prototypes warnings. 2005-06-21 20:53:13 +00:00
Felix Nawothnig 12168fe749 Accept DSERR_NODRIVER from IDirectSoundCapture_CreateCaptureBuffer. 2005-06-21 20:21:39 +00:00
Robert Reif 0043504155 Fix a typo. 2005-06-21 09:43:29 +00:00
Stefan Huehner ac6f562b52 Fix more -Wstrict-prototypes warnings. 2005-06-20 14:18:03 +00:00
Robert Reif e5208ca7a3 Fix roundoff error to prevent negative length. 2005-06-20 14:12:03 +00:00
Francois Gouget 9769816b6e Fix winapi_check documentation warnings. 2005-06-17 20:58:33 +00:00
Alexandre Julliard 2e5cc85dcf Moved config parameters to HKCU\Software\Wine\DirectSound. 2005-06-14 12:34:00 +00:00
Alexandre Julliard 2e4bca9db5 Added magic comments to all Wine-specific registry accesses to make
them easier to grep.
2005-06-13 18:56:00 +00:00
Robert Reif 6b3dc57b5f Make dsound tests loadable on NT4. 2005-06-12 10:41:49 +00:00
Michael Jung e483b0cf9b Fixed confusing indentation. 2005-06-08 18:32:19 +00:00
Robert Reif 7d9340b864 Fix tests to work with drivers that don't support a primary buffer. 2005-06-05 17:55:08 +00:00
Robert Reif 4c315db1a6 Add tests to check DirectSoundCapture creation.
Fix dsound/capture.c to pass tests.
2005-06-05 17:44:30 +00:00
Robert Reif 5c8fb16893 Finish DirectSoundCapture/DirectSoundCapture8 split.
Add tests to verify split.
2005-06-04 09:38:14 +00:00
Robert Reif f46e5ce13c Move FullDuplex code from capture.c to duplex.c. 2005-06-02 10:28:34 +00:00
Robert Reif 48da1d52ad Fix property set description for more than one capture device bug.
Add better traces messages.
2005-06-01 20:04:06 +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 Shearman 54160222a0 Rename MODULENAME_Dll* functions to Dll* for better consistency and
type checking.
2005-05-17 14:41:37 +00:00
Alexandre Julliard 34fa35dc99 Added rules for building import libraries in the individual dll
makefiles, and added support for building a .def.a static import
library too.
2005-05-09 14:42:30 +00:00
Robert Reif 70fe39e42c Remove dead code and redundant variables from DSOUND_CalcPlayPosition
and callers.
2005-05-09 09:23:54 +00:00
Alexandre Julliard d62356aa1e Added rules to build import libraries in the individual dll makefiles.
Generate import libraries with the right name right away instead of
using an intermediate .spec.def file.
2005-05-07 12:39:52 +00:00
Robert Reif 6ec5b351bb Move initialization to IDirectSound_Initialize.
Fix error paths to handle a failed IDirectSound_Initialize.
Add tests for IDirectSound_Initialize.
2005-05-06 19:33:32 +00:00
Francois Gouget f5c9da6860 Assorted spelling fixes. 2005-05-06 15:44:31 +00:00
Robert Reif ed2a6e4aae Set driver type properly. 2005-05-04 09:46:41 +00:00
Robert Reif bc3ad87998 Fully implement WAVEDEVICEMAPPING property set. 2005-04-13 14:39:49 +00:00
Robert Reif ff77f1343e Initialize primary buffer on open. 2005-04-11 13:00:00 +00:00
James Hawkins fd6d3567de Remove nonstandard type LPLPVOID. 2005-04-11 12:52:00 +00:00
Robert Reif 2a438aa033 Keep dsound8.c and dsound.c in sync. 2005-03-30 10:21:44 +00:00
Peter Berg Larsen e732fc023d Janitorial: Get rid of strncpy/strncpyW. 2005-03-28 14:17:51 +00:00
Jakob Eriksson e4fea46b94 Test fix. 2005-03-22 21:16:04 +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 c90c9c7473 waveInPrepareHeader and waveInUnprepareHeader are not really needed
because the contents don't change.
2005-03-16 11:30:17 +00:00
Robert Reif 9329e8f831 Unconditionally free memory. Should make smatch happy. 2005-03-15 19:31:55 +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 1a843b93b6 Private property sets do not exist in early versions of Direct Sound
so skip tests if not supported.
Add tests for A, W and 1 variations of data.
2005-03-14 10:04:07 +00:00
Robert Reif ea7fa3c7db Add missing functionality.
Add more and better error messages.
Add checks for failed HeapAlloc.
2005-03-14 10:03:54 +00:00
Robert Reif aa35787dc7 Don't consider no sound device a failure. 2005-03-05 11:15:27 +00:00
Robert Reif c3f06fb2e6 Print dsound.dll version from file versioninfo resource. 2005-03-05 10:49:08 +00:00
Robert Reif 3b78212f1d Add secondary buffer SetFrequency test. 2005-02-25 19:17:11 +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 f1d4443435 Change SetCooperativeLevel FIXME to WARN. 2005-02-25 16:50:57 +00:00
Robert Reif c9e7bad85b Try old buffer description structure on failure with new one. 2005-02-24 17:02:42 +00:00
Robert Reif 3cab60997f Fix tests for win9x and old versions of DirectX. 2005-02-23 12:43:38 +00:00
Robert Reif 99faf74774 Fix capture test to pass on windows 98 when no sound card present or
device already in use.
2005-02-18 12:52:14 +00:00
Robert Reif 2b30370796 Fix block align test. 2005-02-18 12:51:43 +00:00
Robert Reif c50038542a Some block align cleanups. 2005-02-16 16:26:13 +00:00
Robert Reif b8d6b310f9 Fixed invalid buffer size by rounding up to next multiple of
nBlockAlign.
Added test to verify buffer rounding behavior.
2005-02-16 16:09:02 +00:00
Robert Reif f8833daef1 Removed printing of thread id for AddRef and Release because
WINEDEBUG=+tid gives the same result.
General consistency cleanup.
2005-02-11 11:49:05 +00:00
Francois Gouget 9ee0586cfb Don't link with DirectSoundCreate8 as this prevents running with older
versions of DirectX.
2005-02-10 21:21:13 +00:00
Robert Reif 50dc513b0f Print info about primary buffer format. 2005-02-10 20:26:20 +00:00
Robert Reif 0e0544aa72 Signed/unsigned fix and code cleanup. 2005-02-10 17:10:54 +00:00
Robert Reif 249bc5caea Always allocate an empty buffer. 2005-02-10 17:09:20 +00:00
Robert Reif 098817950d Fill new software buffers with silence. 2005-02-09 14:05:00 +00:00
Robert Reif e70f3e85d8 Fix primary buffer memory leak. 2005-02-01 18:47:23 +00:00
Robert Reif 7d92b5d8b4 Fix structure member name to match windows headers and fix up all
uses.
Nameless struct fix for dsound/propset.c to compile on both windows
and wine.
2005-01-28 17:21:07 +00:00
Robert Reif 47f55d6a28 Don't allow other threads to access the primary buffer while the
format is being changed.
2005-01-24 13:35:57 +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
James Hawkins 6847d5956a Return CLASS_E_NOAGGREGATION if pUnkOuter is non-null. 2005-01-14 15:12:43 +00:00
Robert Reif 202c28f8b8 Remove unneeded includes. 2005-01-10 12:25:56 +00:00
Robert Reif 409e7fb172 Don't need to worry about windows messages. 2005-01-09 17:27:44 +00:00
Eric Pouech cf1d00bb08 Removed excessive statement (break after return or goto, not useful
break, not needed vars...)
2005-01-09 16:42:53 +00:00
Robert Reif 56dbf7fb21 Initialize and uninitialize COM properly. 2005-01-09 16:34:00 +00:00
Michael Stefaniuc 5ad7d858e0 Do not check for non NULL pointer before HeapFree'ing it. It's
redundant.
2004-12-23 17:06:43 +00:00
Eric Pouech 4056d7ef8c Fixed some errors in function prototypes. 2004-12-13 21:19:01 +00:00
Alexandre Julliard ebe3c529b1 Janitorial: C booleans must not be compared against TRUE. 2004-12-09 14:07:59 +00:00
Tomas Vanek 342451b2dd Fixed no memory condition test in IDirectSoundImpl_Create. 2004-12-07 14:23:46 +00:00
Robert Reif d7292751e0 Return the actual device interface name.
Fixes some memory leaks.
2004-12-06 20:37:00 +00:00
Robert Reif 373ab78519 Always create a property set for secondary buffers. 2004-12-06 11:42:58 +00:00
Tom Wickline 5c38e1b561 Version resources cleanup. 2004-11-23 13:59:34 +00:00
Robert Reif aab3aa05b6 Remove trailing white space introduced in previous patch.
Fixed IDirectSoundCaptureBuffer_Stop to allow another Start to
succeed.
Removed OSS centric buffer recreation hack when doing hardware
acceleration.
Cleaned up error reporting and tracing.
2004-11-19 17:56:56 +00:00
Robert Reif b46a106ab1 Remove redundant GUID check. 2004-11-09 20:10:46 +00:00
Robert Reif 50e67ce558 VerifyCertification is not always implemented. 2004-10-26 21:17:37 +00:00
Robert Reif 0a16d361e2 Don't consider a device in use a failure. 2004-10-25 21:45:51 +00:00
Robert Reif b50347d452 Don't consider a bad format an error unless the capabilities say it
should be supported.
Don't consider a device already in use an error.
2004-10-22 19:51:54 +00:00
Robert Reif d4c9f92c65 Trailing white space cleanup.
Add IClassFactory->CreateInstance aggregation checks.
IID_IDirectSoundCapture and IID_IDirectSoundCapture8 are same so
remove redundant check.
Allocate capture buffer for hw driver if necessary.
2004-10-21 20:57:26 +00:00
Robert Reif b80d1d5d92 Don't consider a device that is already in use a test failure. 2004-10-21 19:51:10 +00:00
Robert Reif 3dcbaaa4cc Don't consider failure with DSERR_NODRIVER a test failure. 2004-10-19 21:10:41 +00:00
Robert Reif 097e281294 Fix some places where no driver present causes problems. 2004-10-18 19:36:42 +00:00
Francois Gouget 486d020c1b Don't define COBJMACROS in objbase.h.
Update the Wine sources accordingly.
2004-10-07 03:06:48 +00:00
Robert Reif 8a8ee786ee Cleanup reference counting.
AddRef and Release return ULONG.
2004-09-17 18:10:59 +00:00
Robert Reif b970aeb4b7 Cleanup reference counting. 2004-09-16 19:08:04 +00:00
Robert Reif adc6948c4c Remove lock name from lock debug structure before deletion so it gets
freed properly.
2004-09-10 22:30:05 +00:00
Robert Reif 6f9d41673f Return error from low level driver when necessary. 2004-09-10 19:34:01 +00:00
Alexandre Julliard 314b99c48f Removed some more uses of the non-standard ICOM_THIS macro. 2004-09-09 20:17:07 +00:00
Francois Gouget 7c89759e88 Make the dsound tests run with DirectX < 8. 2004-09-08 19:08:14 +00:00
Francois Gouget e3fb36140a Remove the get_hwnd() implementation from propset.c and reuse the
common one.
2004-09-08 19:07:57 +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
Francois Gouget f3880a29ea Don't use DSBCAPS_{CTRLDEFAULT,CTRLALL} in capability-dumping
functions since they are nothing but a combination of other flags and
are thus redundant.
2004-08-31 18:50:59 +00:00
Robert Reif f01b871898 DirectSound8 doesn't accept 3D stereo secondary buffers but
DirectSound does.
Added tests.
2004-08-25 02:09:00 +00:00
Alexandre Julliard f714b39762 Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
macro.
2004-08-23 19:39:48 +00:00
Robert Reif 1bd7986c93 Only print format info when in interactive mode for capture test.
Cleanup error and info messges.
2004-08-23 17:50:31 +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 b6abcb51a8 Cleanup messages. 2004-08-18 20:53:40 +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 cae33167d2 Cleanup some more messages. 2004-08-18 00:30:12 +00:00
Robert Reif 1d3c40d577 Delete buffer array when releasing last buffer. 2004-08-16 19:59:54 +00:00
Robert Reif eba298017d Allow proper release while capturing. 2004-08-16 19:59:37 +00:00
Robert Reif 9d5b0873a0 More dsound tests error message cleanups.
Only display verbose information when in interactive mode.
2004-08-13 19:44:29 +00:00
Alexandre Julliard 48c4bb3c31 Get rid of the non-standard ICOM_VTABLE macro. 2004-08-12 23:00:51 +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
Alexandre Julliard 0467ce9fd7 Get rid of the non-standard ICOM_VFIELD macro. 2004-08-12 19:52:49 +00:00
Robert Reif 74662974f6 Start cleaning up error messages.
Don't print verbose info unless in interactive mode or debugging.
2004-08-12 03:29:39 +00:00
Robert Reif 704e16c32d Fixed a bug where freqAdjust was not being updated properly when the
primary buffer format changed.
2004-08-11 00:18:13 +00:00
Francois Gouget 4d73f22245 Remove the assert()s that checked that IDirectSoundBuffer_Lock() is
given two distinct pointers.
2004-08-09 22:56:45 +00:00
Hans Leidekker dbb3e14748 Fix signed/unsigned comparison warnings. 2004-08-09 18:52:18 +00:00
Robert Reif fbce110be4 Test different primary buffer formats while keeping the secondary
buffer format constant.
2004-08-09 18:50:06 +00:00
Robert Reif 7ef15a607c Adds debug name to remaining critical sections. 2004-08-06 17:30:00 +00:00
Robert Reif 7bf7bce0da Add CRITICAL_SECTION debug info. 2004-08-04 18:14:21 +00:00
Gerald Pfeifer 0ba37e23d9 Avoid using round(), which is unportable. 2004-08-02 18:47:09 +00:00
Francois Gouget 1426632839 Check the return value of IDirectSoundImpl_Create() to detect errors.
Always set *ppDS to NULL in case of error.
2004-08-02 18:27:16 +00:00
Robert Reif 4c3d661781 Refactored common test code into subroutines.
Added tests for correct Compact behavior.
Added tests for all possible IDirectSound[8] creation modes with good
and bad arguments.
Split dsound.c and ds3d.c into separate files for IDirectSound and
IDirectSound8 interfaces and added code to not execute IDirectSound8
tests when run with a dsound.dll of version 7 or earlier.  We should
now be able to run these tests on a Windows system with DX7 or earlier
(untested).
2004-07-30 18:42:51 +00:00
Robert Reif b6ab40e977 Added error checking to IDirectSound_Compact.
Fixed IDirectSoundImpl_Create to return DSERR_NODRIVER for a bad
device IID.
2004-07-30 18:42:23 +00:00
Francois Gouget 9f40a12ed6 Small cleanup in IDirectSoundBufferImpl_SetPan(). 2004-07-23 22:58:59 +00:00
Francois Gouget 7433202199 Check that modifying the secondary buffer volume/pan does not change
the primary buffer's volume and pan.
2004-07-23 22:58:46 +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 73bd3be8c8 Downgrade tests to DX8 level so it can build on all windows
platforms.
2004-07-22 20:35:36 +00:00
Robert Reif 0e3629c3d4 Dump DirectSound capabilities flags. 2004-07-22 19:42:11 +00:00
Robert Reif aa60b5ec0d Removes dsconf IIDs from dxguid.lib.
Fixes propset files for missing IIDs.
2004-07-22 19:40:44 +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
Francois Gouget cc3a95c6e9 Make the listener/sound position update duration and TIME_SLICE
independent.
Set the sound and listener velocity and increase the sound source
velocity so we may get some doppler effect.
Added some traces so one can monitor the listener/sound positions with
WINETEST_DEBUG=3.
2004-07-19 21:20:38 +00:00
Robert Reif 3ce9c5f4b8 Do initialization to match windows behavior (with test). 2004-07-19 20:06:22 +00:00
Robert Reif 429d3059b1 Fixes the right bugs and keeps intent of test.
Adds more reference count checks.
2004-07-19 19:34:44 +00:00
Francois Gouget b5ee682cae Don't try to create a IDirectSound3DBuffer, partly to keep this test
simple and partly because it's going to fail since we did not request
DSBCAPS_CTRL3D. Fixes a crash on Windows.
Don't request unneeded caps.
2004-07-17 00:04:17 +00:00
Francois Gouget 57aa9ebc38 Get and print the DirectSound primary buffer volume. 2004-07-16 23:42:44 +00:00
Francois Gouget 910b695822 Keep track of how much has been played and get rid of last_pos. This
fixes a bug where buffer_service() would not detect that everything
had been played.
Check that the actual sound duration was within 10% of the expected
value.
Make BUFFER_LEN and TIME_SLICE independent, make sure TIME_SLICE does
not divide BUFFER_LEN to spice things up a bit.
2004-07-16 23:42:32 +00:00
Francois Gouget 4c64f9bdf9 Call IDirectSound::Initialize() as per MSDN before using the
DirectSound object. Fixes a crash on Windows.
2004-07-16 23:21:46 +00:00
Francois Gouget acb7207a9d On Windows GetPan() may not return the value that was just set with
SetPan().
2004-07-16 23:21:33 +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 ed9d91e6a1 - Create IDirectSound and IDirectSound8 objects using the
CoCreateInstance COM function to test the Class Factory interfaces.
- Create IDirectSound and IDirectSound8 objects using CreateDirectSound
  and CreateDirectSound8 using a NULL device GUID.
2004-07-12 19:45:28 +00:00
Robert Reif f66807f248 Better error checking and recovery. 2004-07-09 19:25:39 +00:00
Francois Gouget ca942f1625 Assorted spelling fixes. 2004-07-08 20:16:23 +00:00
Robert Reif 84e292c614 Fix IDirectSoundBuffer8_Initialize function prototype and use. 2004-07-06 19:27:00 +00:00
Robert Reif 5d8997d881 Create DirectSound or DirectSound8 depending on riid. 2004-07-06 19:25:59 +00:00
Robert Reif 33e4506cda Get certification for VerifyCertification from driver to match
GetCaps.
Change OSS driver to report certified.
Change OSS driver to show message name rather than number in traces.
2004-07-06 18:43:57 +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
Francois Gouget de9af2414b Split the 'dsound' test into two parts:
- the sound format test. Plays a 5 second reference tone to help
  debug issues with the tone duration and help detect stutter issues.
  Prints explanations describing the sound format interactive
  test. Then plays a 1 second test tone for each supported sound
  format.
- the 3D sound tests. Performs the volume, panning, moving listener
  tests, etc.
2004-06-17 23:03:11 +00:00
Eric Pouech df93f2eeee GetModuleFileName[AW] doesn't terminate the string if the buffer is
too small.
2004-05-19 03:22:55 +00:00
Patrik Stridvall 070db4e5de Fixed some issues found by winapi_check. 2004-05-17 21:08:31 +00:00
Ivan Leo Murray-Smith 10778aa761 Updated the version info of all DirectX dlls to the version numbers of
DirectX 9.0b for Windows 2000/XP.
2004-05-14 21:37:32 +00:00
Robert Reif dbb03ec6dc Fixes support for older versions of direct sound.
Adds support for deleting notification array.
Minor debug and white space cleanups.
2004-04-19 02:58:45 +00:00
Robert Reif 92b48ba8f6 Fixed deadlock in capture callback.
Fixed capture test to check all notifications.
Added better debug messages to capture test.
2004-04-06 20:08:54 +00:00
Alexandre Julliard 9e4ed6460c .spec.c files are no longer used for 32-bit dlls. 2004-03-24 03:36:44 +00:00
Robert Reif 14a7c6ddca Remove unused lock. 2004-03-17 01:44:15 +00:00
Alexandre Julliard 589e115233 We no longer use the .exe.spec.c files. 2004-03-02 21:16:37 +00:00
Robert Reif 41b89ddd53 Properly release hardware primary buffer when changing formats. 2004-02-13 20:22:02 +00:00