mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
A simple test for IDirectSound.GetCaps.
This commit is contained in:
parent
d97bbd05b0
commit
d523a45bd0
@ -1418,6 +1418,7 @@ dlls/dinput8/Makefile
|
||||
dlls/dplay/Makefile
|
||||
dlls/dplayx/Makefile
|
||||
dlls/dsound/Makefile
|
||||
dlls/dsound/tests/Makefile
|
||||
dlls/gdi/Makefile
|
||||
dlls/gdi/tests/Makefile
|
||||
dlls/glu32/Makefile
|
||||
|
@ -18,7 +18,8 @@ C_SRCS = \
|
||||
propset.c \
|
||||
sound3d.c
|
||||
|
||||
SUBDIRS = tests
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
### Dependencies:
|
||||
|
||||
|
4
dlls/dsound/tests/.cvsignore
Normal file
4
dlls/dsound/tests/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
||||
Makefile
|
||||
dsound.ok
|
||||
dsound_test.exe.spec.c
|
||||
testlist.c
|
13
dlls/dsound/tests/Makefile.in
Normal file
13
dlls/dsound/tests/Makefile.in
Normal file
@ -0,0 +1,13 @@
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
TESTDLL = dsound.dll
|
||||
IMPORTS = dsound kernel32
|
||||
|
||||
CTESTS = \
|
||||
dsound.c
|
||||
|
||||
@MAKE_TEST_RULES@
|
||||
|
||||
### Dependencies:
|
66
dlls/dsound/tests/dsound.c
Normal file
66
dlls/dsound/tests/dsound.c
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Unit tests for dsound functions
|
||||
*
|
||||
* Copyright (c) 2002 Francois Gouget
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "wine/test.h"
|
||||
#include "dsound.h"
|
||||
|
||||
|
||||
|
||||
BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
|
||||
LPCSTR lpcstrModule, LPVOID lpContext)
|
||||
{
|
||||
HRESULT rc;
|
||||
LPDIRECTSOUND dso;
|
||||
|
||||
winetest_trace("Testing %s - %s\n",lpcstrDescription,lpcstrModule);
|
||||
rc=DirectSoundCreate(lpGuid,&dso,NULL);
|
||||
ok(rc==DS_OK,"DirectSoundCreate failed: %lx\n",rc);
|
||||
if (rc==DS_OK) {
|
||||
DSCAPS caps;
|
||||
|
||||
caps.dwSize=0;
|
||||
rc=IDirectSound_GetCaps(dso,&caps);
|
||||
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %lx\n",rc);
|
||||
|
||||
caps.dwSize=sizeof(caps);
|
||||
rc=IDirectSound_GetCaps(dso,&caps);
|
||||
ok(rc==DS_OK,"GetCaps failed: %lx\n",rc);
|
||||
if (rc==DS_OK) {
|
||||
winetest_trace(" flags=%lx secondary min=%ld max=%ld\n",
|
||||
caps.dwFlags,caps.dwMinSecondarySampleRate,
|
||||
caps.dwMaxSecondarySampleRate);
|
||||
}
|
||||
|
||||
IDirectSound_Release(dso);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void dsound_out_tests()
|
||||
{
|
||||
HRESULT rc;
|
||||
rc=DirectSoundEnumerateA(&dsenum_callback,NULL);
|
||||
ok(rc==DS_OK,"DirectSoundEnumerate failed: %ld\n",rc);
|
||||
}
|
||||
|
||||
START_TEST(dsound)
|
||||
{
|
||||
dsound_out_tests();
|
||||
}
|
Loading…
Reference in New Issue
Block a user