Code cleanup
This commit is contained in:
@@ -681,7 +681,7 @@ InitSound()
|
|||||||
dsbd.dwFlags = DSBCAPS_STICKYFOCUS; // | DSBCAPS_PRIMARYBUFFER;
|
dsbd.dwFlags = DSBCAPS_STICKYFOCUS; // | DSBCAPS_PRIMARYBUFFER;
|
||||||
dsbd.dwBufferBytes = SoundBufferSize;
|
dsbd.dwBufferBytes = SoundBufferSize;
|
||||||
dsbd.lpwfxFormat = &wfx;
|
dsbd.lpwfxFormat = &wfx;
|
||||||
|
|
||||||
if (DS_OK == lpDirectSound->CreateSoundBuffer(&dsbd, &lpPrimaryBuffer, NULL))
|
if (DS_OK == lpDirectSound->CreateSoundBuffer(&dsbd, &lpPrimaryBuffer, NULL))
|
||||||
{
|
{
|
||||||
if (DS_OK == lpPrimaryBuffer->QueryInterface(IID_IDirectSoundBuffer8, (LPVOID *) &lpSoundBuffer))
|
if (DS_OK == lpPrimaryBuffer->QueryInterface(IID_IDirectSoundBuffer8, (LPVOID *) &lpSoundBuffer))
|
||||||
@@ -689,7 +689,7 @@ InitSound()
|
|||||||
if (DS_OK != lpSoundBuffer->Play(0,0,DSBPLAY_LOOPING))
|
if (DS_OK != lpSoundBuffer->Play(0,0,DSBPLAY_LOOPING))
|
||||||
{
|
{
|
||||||
SoundEnabled=0; return FALSE;
|
SoundEnabled=0; return FALSE;
|
||||||
}
|
}
|
||||||
FirstSound=0;
|
FirstSound=0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user