mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
dsound: Handle primary buffers in two more IDirectSoundBuffer methods.
This commit is contained in:
parent
a2bc634eaa
commit
c35745d45a
1 changed files with 11 additions and 3 deletions
|
@ -284,6 +284,11 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(IDirectSoundBuffer8 *i
|
|||
|
||||
TRACE("(%p,%d)\n",This,freq);
|
||||
|
||||
if (is_primary_buffer(This)) {
|
||||
WARN("not available for primary buffers.\n");
|
||||
return DSERR_CONTROLUNAVAIL;
|
||||
}
|
||||
|
||||
if (!(This->dsbd.dwFlags & DSBCAPS_CTRLFREQUENCY)) {
|
||||
WARN("control unavailable\n");
|
||||
return DSERR_CONTROLUNAVAIL;
|
||||
|
@ -397,9 +402,12 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(IDirectSoundBuffer8 *iface)
|
|||
|
||||
TRACE("(%p) ref was %d\n", This, ref + 1);
|
||||
|
||||
if (!ref && !InterlockedDecrement(&This->numIfaces))
|
||||
secondarybuffer_destroy(This);
|
||||
|
||||
if (!ref && !InterlockedDecrement(&This->numIfaces)) {
|
||||
if (is_primary_buffer(This))
|
||||
primarybuffer_destroy(This);
|
||||
else
|
||||
secondarybuffer_destroy(This);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue