Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a15ef7b1
Commit
a15ef7b1
authored
Apr 29, 2006
by
Robert Reif
Committed by
Alexandre Julliard
May 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Add DirectSoundBuffer_Lock tests.
parent
b06a0609
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
ds3d.c
dlls/dsound/tests/ds3d.c
+16
-0
ds3d8.c
dlls/dsound/tests/ds3d8.c
+16
-0
No files found.
dlls/dsound/tests/ds3d.c
View file @
a15ef7b1
...
@@ -436,6 +436,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
...
@@ -436,6 +436,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
LPDIRECTSOUND3DBUFFER
buffer
=
NULL
;
LPDIRECTSOUND3DBUFFER
buffer
=
NULL
;
DS3DBUFFER
buffer_param
;
DS3DBUFFER
buffer_param
;
DWORD
start_time
,
now
;
DWORD
start_time
,
now
;
LPVOID
buffer1
;
DWORD
length1
;
if
(
winetest_interactive
)
{
if
(
winetest_interactive
)
{
if
(
set_frequency
)
if
(
set_frequency
)
...
@@ -559,6 +561,20 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
...
@@ -559,6 +561,20 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
}
}
}
}
/* try an offset past the end of the buffer */
rc
=
IDirectSoundBuffer_Lock
(
*
dsbo
,
state
.
buffer_size
,
0
,
&
buffer1
,
&
length1
,
NULL
,
NULL
,
DSBLOCK_ENTIREBUFFER
);
ok
(
rc
==
DSERR_INVALIDPARAM
,
"IDirectSoundBuffer_Lock() should have "
"returned DSERR_INVALIDPARAM, returned %s
\n
"
,
DXGetErrorString8
(
rc
));
/* try a size larger than the buffer */
rc
=
IDirectSoundBuffer_Lock
(
*
dsbo
,
0
,
state
.
buffer_size
+
1
,
&
buffer1
,
&
length1
,
NULL
,
NULL
,
DSBLOCK_FROMWRITECURSOR
);
ok
(
rc
==
DSERR_INVALIDPARAM
,
"IDirectSoundBuffer_Lock() should have "
"returned DSERR_INVALIDPARAM, returned %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
set_frequency
)
if
(
set_frequency
)
state
.
wave
=
wave_generate_la
(
&
wfx
,(
duration
*
frequency
)
/
wfx
.
nSamplesPerSec
,
&
state
.
wave_len
);
state
.
wave
=
wave_generate_la
(
&
wfx
,(
duration
*
frequency
)
/
wfx
.
nSamplesPerSec
,
&
state
.
wave_len
);
else
else
...
...
dlls/dsound/tests/ds3d8.c
View file @
a15ef7b1
...
@@ -328,6 +328,8 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
...
@@ -328,6 +328,8 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
LPDIRECTSOUND3DBUFFER
buffer
=
NULL
;
LPDIRECTSOUND3DBUFFER
buffer
=
NULL
;
DS3DBUFFER
buffer_param
;
DS3DBUFFER
buffer_param
;
DWORD
start_time
,
now
;
DWORD
start_time
,
now
;
LPVOID
buffer1
;
DWORD
length1
;
if
(
winetest_interactive
)
{
if
(
winetest_interactive
)
{
trace
(
" Playing %g second 440Hz tone at %ldx%dx%d
\n
"
,
duration
,
trace
(
" Playing %g second 440Hz tone at %ldx%dx%d
\n
"
,
duration
,
...
@@ -445,6 +447,20 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
...
@@ -445,6 +447,20 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
}
}
}
}
/* try an offset past the end of the buffer */
rc
=
IDirectSoundBuffer_Lock
(
*
dsbo
,
state
.
buffer_size
,
0
,
&
buffer1
,
&
length1
,
NULL
,
NULL
,
DSBLOCK_ENTIREBUFFER
);
ok
(
rc
==
DSERR_INVALIDPARAM
,
"IDirectSoundBuffer_Lock() should have "
"returned DSERR_INVALIDPARAM, returned %s
\n
"
,
DXGetErrorString8
(
rc
));
/* try a size larger than the buffer */
rc
=
IDirectSoundBuffer_Lock
(
*
dsbo
,
0
,
state
.
buffer_size
+
1
,
&
buffer1
,
&
length1
,
NULL
,
NULL
,
DSBLOCK_FROMWRITECURSOR
);
ok
(
rc
==
DSERR_INVALIDPARAM
,
"IDirectSoundBuffer_Lock() should have "
"returned DSERR_INVALIDPARAM, returned %s
\n
"
,
DXGetErrorString8
(
rc
));
state
.
wave
=
wave_generate_la
(
&
wfx
,
duration
,
&
state
.
wave_len
);
state
.
wave
=
wave_generate_la
(
&
wfx
,
duration
,
&
state
.
wave_len
);
state
.
dsbo
=*
dsbo
;
state
.
dsbo
=*
dsbo
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment