- Fix broken assert 
- Fix calculation of length for the first locked audio buffer

svn path=/trunk/; revision=45488
This commit is contained in:
Johannes Anderwald 2010-02-07 15:57:25 +00:00
parent f326fb3cb3
commit 11c549d526

View file

@ -263,8 +263,9 @@ SecondaryDirectSoundBuffer8Impl_fnLock(
else
{
ASSERT(dwOffset < This->BufferSize);
ASSERT(dwBytes < This->BufferSize);
ASSERT(dwBytes + dwOffset <= This->BufferSize);
ASSERT(dwBytes <= This->BufferSize);
dwBytes = min(This->BufferSize - dwOffset, dwBytes);
*ppvAudioPtr1 = This->Buffer + dwOffset;
*pdwAudioBytes1 = dwBytes;
@ -316,7 +317,7 @@ SecondaryDirectSoundBuffer8Impl_fnPlay(
/* release primary buffer */
PrimaryDirectSoundBuffer_ReleaseLock(This->PrimaryBuffer);
DPRINT1("SetFormatSuccess PrimaryBuffer %p\n", This->PrimaryBuffer);
DPRINT("SetFormatSuccess PrimaryBuffer %p\n", This->PrimaryBuffer);
return DS_OK;
}