Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
a8da43fa5d
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      build/win32/platform_specific_code/juce_win32_DirectSound.cpp

+ 13
- 2
build/win32/platform_specific_code/juce_win32_DirectSound.cpp View File

@@ -373,7 +373,7 @@ public:
totalBytesPerBuffer = (3 * bytesPerBuffer) & ~15;
const int numChannels = 2;
hr = pDirectSound->SetCooperativeLevel (GetDesktopWindow(), 3 /* DSSCL_EXCLUSIVE */);
hr = pDirectSound->SetCooperativeLevel (GetDesktopWindow(), 2 /* DSSCL_PRIORITY */);
logError (hr);
if (hr == S_OK)
@@ -512,6 +512,16 @@ public:
(void**) &lpbuf1, &dwSize1,
(void**) &lpbuf2, &dwSize2, 0);
if (hr == MAKE_HRESULT (1, 0x878, 150)) // DSERR_BUFFERLOST
{
pOutputBuffer->Restore();
hr = pOutputBuffer->Lock (writeOffset,
bytesPerBuffer,
(void**) &lpbuf1, &dwSize1,
(void**) &lpbuf2, &dwSize2, 0);
}
if (hr == S_OK)
{
if (bitDepth == 16)
@@ -991,7 +1001,8 @@ public:
sampleRate (0.0),
inputBuffers (0),
outputBuffers (0),
callback (0)
callback (0),
bufferSizeSamples (0)
{
}


Loading…
Cancel
Save