mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
This commit is contained in:
parent
36ee97f2d7
commit
a8da43fa5d
1 changed files with 13 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue