mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
[DSOUND]
- Fix broken assert - Fix calculation of length for the first locked audio buffer svn path=/trunk/; revision=45488
This commit is contained in:
parent
f326fb3cb3
commit
11c549d526
1 changed files with 4 additions and 3 deletions
|
@ -263,8 +263,9 @@ SecondaryDirectSoundBuffer8Impl_fnLock(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ASSERT(dwOffset < This->BufferSize);
|
ASSERT(dwOffset < This->BufferSize);
|
||||||
ASSERT(dwBytes < This->BufferSize);
|
ASSERT(dwBytes <= This->BufferSize);
|
||||||
ASSERT(dwBytes + dwOffset <= This->BufferSize);
|
|
||||||
|
dwBytes = min(This->BufferSize - dwOffset, dwBytes);
|
||||||
|
|
||||||
*ppvAudioPtr1 = This->Buffer + dwOffset;
|
*ppvAudioPtr1 = This->Buffer + dwOffset;
|
||||||
*pdwAudioBytes1 = dwBytes;
|
*pdwAudioBytes1 = dwBytes;
|
||||||
|
@ -316,7 +317,7 @@ SecondaryDirectSoundBuffer8Impl_fnPlay(
|
||||||
/* release primary buffer */
|
/* release primary buffer */
|
||||||
PrimaryDirectSoundBuffer_ReleaseLock(This->PrimaryBuffer);
|
PrimaryDirectSoundBuffer_ReleaseLock(This->PrimaryBuffer);
|
||||||
|
|
||||||
DPRINT1("SetFormatSuccess PrimaryBuffer %p\n", This->PrimaryBuffer);
|
DPRINT("SetFormatSuccess PrimaryBuffer %p\n", This->PrimaryBuffer);
|
||||||
return DS_OK;
|
return DS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue