dsound: Don't use state.buffer_size before it has been initialized.
Francois Gouget
fgouget at free.fr
Fri Sep 29 05:45:02 CDT 2006
---
I cannot garantee that the test will still succeed after this patch
because it was already failing before :-(
Might be because of some weirdness specific to my system, but
then, as I often get told, xmms works just fine so why not Wine!
So something to investigate further at some point...
dlls/dsound/tests/ds3d.c | 4 ++--
dlls/dsound/tests/ds3d8.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c
index 5dc0a2e..db0ddfe 100644
--- a/dlls/dsound/tests/ds3d.c
+++ b/dlls/dsound/tests/ds3d.c
@@ -562,14 +562,14 @@ void test_buffer(LPDIRECTSOUND dso, LPDI
}
/* try an offset past the end of the buffer */
- rc = IDirectSoundBuffer_Lock(*dsbo, state.buffer_size, 0, &buffer1,
+ rc = IDirectSoundBuffer_Lock(*dsbo, dsbcaps.dwBufferBytes, 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,
+ rc = IDirectSoundBuffer_Lock(*dsbo, 0, dsbcaps.dwBufferBytes + 1,
&buffer1, &length1, NULL, NULL,
DSBLOCK_FROMWRITECURSOR);
ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have "
diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c
index 9208582..ef02a45 100644
--- a/dlls/dsound/tests/ds3d8.c
+++ b/dlls/dsound/tests/ds3d8.c
@@ -448,14 +448,14 @@ void test_buffer8(LPDIRECTSOUND8 dso, LP
}
/* try an offset past the end of the buffer */
- rc = IDirectSoundBuffer_Lock(*dsbo, state.buffer_size, 0, &buffer1,
+ rc = IDirectSoundBuffer_Lock(*dsbo, dsbcaps.dwBufferBytes, 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,
+ rc = IDirectSoundBuffer_Lock(*dsbo, 0, dsbcaps.dwBufferBytes + 1,
&buffer1, &length1, NULL, NULL,
DSBLOCK_FROMWRITECURSOR);
ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have "
--
1.4.1.1
More information about the wine-patches
mailing list