Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b970aeb4
Commit
b970aeb4
authored
Sep 16, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Sep 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup reference counting.
parent
6df12bb3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
96 deletions
+40
-96
buffer.c
dlls/dsound/buffer.c
+1
-3
capture.c
dlls/dsound/capture.c
+11
-60
dsound.c
dlls/dsound/dsound.c
+11
-11
dsound_main.c
dlls/dsound/dsound_main.c
+4
-4
primary.c
dlls/dsound/primary.c
+1
-5
propset.c
dlls/dsound/propset.c
+8
-9
sound3d.c
dlls/dsound/sound3d.c
+4
-4
No files found.
dlls/dsound/buffer.c
View file @
b970aeb4
...
...
@@ -70,12 +70,10 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_QueryInterface(
static
ULONG
WINAPI
IDirectSoundNotifyImpl_AddRef
(
LPDIRECTSOUNDNOTIFY
iface
)
{
IDirectSoundNotifyImpl
*
This
=
(
IDirectSoundNotifyImpl
*
)
iface
;
DWORD
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
return
ref
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
IDirectSoundNotifyImpl_Release
(
LPDIRECTSOUNDNOTIFY
iface
)
{
...
...
dlls/dsound/capture.c
View file @
b970aeb4
...
...
@@ -373,19 +373,9 @@ IDirectSoundCaptureImpl_QueryInterface(
static
ULONG
WINAPI
IDirectSoundCaptureImpl_AddRef
(
LPDIRECTSOUNDCAPTURE
iface
)
{
ULONG
uRef
;
IDirectSoundCaptureImpl
*
This
=
(
IDirectSoundCaptureImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
EnterCriticalSection
(
&
(
This
->
lock
)
);
uRef
=
++
(
This
->
ref
);
if
(
This
->
driver
)
IDsCaptureDriver_AddRef
(
This
->
driver
);
LeaveCriticalSection
(
&
(
This
->
lock
)
);
return
uRef
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
...
...
@@ -395,12 +385,7 @@ IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface )
IDirectSoundCaptureImpl
*
This
=
(
IDirectSoundCaptureImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
EnterCriticalSection
(
&
(
This
->
lock
)
);
uRef
=
--
(
This
->
ref
);
LeaveCriticalSection
(
&
(
This
->
lock
)
);
uRef
=
InterlockedDecrement
(
&
(
This
->
ref
));
if
(
uRef
==
0
)
{
TRACE
(
"deleting object
\n
"
);
if
(
This
->
capture_buffer
)
...
...
@@ -788,12 +773,8 @@ static HRESULT WINAPI IDirectSoundCaptureNotifyImpl_QueryInterface(
static
ULONG
WINAPI
IDirectSoundCaptureNotifyImpl_AddRef
(
LPDIRECTSOUNDNOTIFY
iface
)
{
IDirectSoundCaptureNotifyImpl
*
This
=
(
IDirectSoundCaptureNotifyImpl
*
)
iface
;
DWORD
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
return
ref
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
IDirectSoundCaptureNotifyImpl_Release
(
LPDIRECTSOUNDNOTIFY
iface
)
...
...
@@ -958,19 +939,9 @@ IDirectSoundCaptureBufferImpl_QueryInterface(
static
ULONG
WINAPI
IDirectSoundCaptureBufferImpl_AddRef
(
LPDIRECTSOUNDCAPTUREBUFFER8
iface
)
{
ULONG
uRef
;
IDirectSoundCaptureBufferImpl
*
This
=
(
IDirectSoundCaptureBufferImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
assert
(
This
->
dsound
);
EnterCriticalSection
(
&
(
This
->
dsound
->
lock
)
);
uRef
=
++
(
This
->
ref
);
LeaveCriticalSection
(
&
(
This
->
dsound
->
lock
)
);
return
uRef
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
...
...
@@ -980,14 +951,7 @@ IDirectSoundCaptureBufferImpl_Release( LPDIRECTSOUNDCAPTUREBUFFER8 iface )
IDirectSoundCaptureBufferImpl
*
This
=
(
IDirectSoundCaptureBufferImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
assert
(
This
->
dsound
);
EnterCriticalSection
(
&
(
This
->
dsound
->
lock
)
);
uRef
=
--
(
This
->
ref
);
LeaveCriticalSection
(
&
(
This
->
dsound
->
lock
)
);
uRef
=
InterlockedDecrement
(
&
(
This
->
ref
));
if
(
uRef
==
0
)
{
TRACE
(
"deleting object
\n
"
);
if
(
This
->
dsound
->
state
==
STATE_CAPTURING
)
...
...
@@ -1613,7 +1577,7 @@ DSCCF_AddRef(LPCLASSFACTORY iface)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
...
...
@@ -1622,7 +1586,7 @@ DSCCF_Release(LPCLASSFACTORY iface)
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
(
This
->
ref
)
);
}
static
HRESULT
WINAPI
...
...
@@ -1761,17 +1725,9 @@ IDirectSoundFullDuplexImpl_QueryInterface(
static
ULONG
WINAPI
IDirectSoundFullDuplexImpl_AddRef
(
LPDIRECTSOUNDFULLDUPLEX
iface
)
{
ULONG
uRef
;
IDirectSoundFullDuplexImpl
*
This
=
(
IDirectSoundFullDuplexImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
EnterCriticalSection
(
&
(
This
->
lock
)
);
uRef
=
++
(
This
->
ref
);
LeaveCriticalSection
(
&
(
This
->
lock
)
);
return
uRef
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
...
...
@@ -1781,12 +1737,7 @@ IDirectSoundFullDuplexImpl_Release( LPDIRECTSOUNDFULLDUPLEX iface )
IDirectSoundFullDuplexImpl
*
This
=
(
IDirectSoundFullDuplexImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
EnterCriticalSection
(
&
(
This
->
lock
)
);
uRef
=
--
(
This
->
ref
);
LeaveCriticalSection
(
&
(
This
->
lock
)
);
uRef
=
InterlockedDecrement
(
&
(
This
->
ref
));
if
(
uRef
==
0
)
{
This
->
lock
.
DebugInfo
->
Spare
[
1
]
=
0
;
DeleteCriticalSection
(
&
(
This
->
lock
)
);
...
...
@@ -1849,7 +1800,7 @@ DSFDCF_AddRef(LPCLASSFACTORY iface)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
...
...
@@ -1858,7 +1809,7 @@ DSFDCF_Release(LPCLASSFACTORY iface)
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
(
This
->
ref
)
);
}
static
HRESULT
WINAPI
...
...
dlls/dsound/dsound.c
View file @
b970aeb4
...
...
@@ -249,7 +249,7 @@ static ULONG WINAPI IDirectSoundImpl_AddRef(
IDirectSoundImpl
*
This
=
(
IDirectSoundImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
IDirectSoundImpl_Release
(
...
...
@@ -260,7 +260,7 @@ static ULONG WINAPI IDirectSoundImpl_Release(
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ref
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
if
(
ref
==
0
)
{
HRESULT
hres
;
INT
i
;
...
...
@@ -985,7 +985,7 @@ static ULONG WINAPI IDirectSound_IUnknown_AddRef(
{
IDirectSound_IUnknown
*
This
=
(
IDirectSound_IUnknown
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
IDirectSound_IUnknown_Release
(
...
...
@@ -994,7 +994,7 @@ static ULONG WINAPI IDirectSound_IUnknown_Release(
IDirectSound_IUnknown
*
This
=
(
IDirectSound_IUnknown
*
)
iface
;
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
if
(
ulReturn
==
0
)
{
IDirectSoundImpl_Release
(
This
->
pds
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -1063,7 +1063,7 @@ static ULONG WINAPI IDirectSound_IDirectSound_AddRef(
{
IDirectSound_IDirectSound
*
This
=
(
IDirectSound_IDirectSound
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
IDirectSound_IDirectSound_Release
(
...
...
@@ -1224,7 +1224,7 @@ static ULONG WINAPI IDirectSound8_IUnknown_AddRef(
{
IDirectSound_IUnknown
*
This
=
(
IDirectSound_IUnknown
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
IDirectSound8_IUnknown_Release
(
...
...
@@ -1233,7 +1233,7 @@ static ULONG WINAPI IDirectSound8_IUnknown_Release(
IDirectSound_IUnknown
*
This
=
(
IDirectSound_IUnknown
*
)
iface
;
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
if
(
ulReturn
==
0
)
{
IDirectSoundImpl_Release
(
This
->
pds
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -1302,7 +1302,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound_AddRef(
{
IDirectSound8_IDirectSound
*
This
=
(
IDirectSound8_IDirectSound
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
IDirectSound8_IDirectSound_Release
(
...
...
@@ -1311,7 +1311,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound_Release(
IDirectSound8_IDirectSound
*
This
=
(
IDirectSound8_IDirectSound
*
)
iface
;
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
if
(
ulReturn
==
0
)
{
IDirectSoundImpl_Release
(
This
->
pds
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -1463,7 +1463,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound8_AddRef(
{
IDirectSound8_IDirectSound8
*
This
=
(
IDirectSound8_IDirectSound8
*
)
iface
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
IDirectSound8_IDirectSound8_Release
(
...
...
@@ -1472,7 +1472,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound8_Release(
IDirectSound8_IDirectSound8
*
This
=
(
IDirectSound8_IDirectSound8
*
)
iface
;
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
if
(
ulReturn
==
0
)
{
IDirectSoundImpl_Release
(
This
->
pds
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
dlls/dsound/dsound_main.c
View file @
b970aeb4
...
...
@@ -448,14 +448,14 @@ static ULONG WINAPI
DSCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
DSCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
(
This
->
ref
)
);
}
static
HRESULT
WINAPI
DSCF_CreateInstance
(
...
...
@@ -513,7 +513,7 @@ static ULONG WINAPI
DSPCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
(
This
->
ref
)
);
}
static
ULONG
WINAPI
...
...
@@ -521,7 +521,7 @@ DSPCF_Release(LPCLASSFACTORY iface) {
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
(
This
->
ref
)
);
}
static
HRESULT
WINAPI
...
...
dlls/dsound/primary.c
View file @
b970aeb4
...
...
@@ -580,12 +580,8 @@ static HRESULT WINAPI PrimaryBufferImpl_Stop(LPDIRECTSOUNDBUFFER8 iface)
static
DWORD
WINAPI
PrimaryBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
{
PrimaryBufferImpl
*
This
=
(
PrimaryBufferImpl
*
)
iface
;
DWORD
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
return
ref
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
DWORD
WINAPI
PrimaryBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
{
...
...
dlls/dsound/propset.c
View file @
b970aeb4
...
...
@@ -74,11 +74,8 @@ static HRESULT WINAPI IKsBufferPropertySetImpl_QueryInterface(
static
ULONG
WINAPI
IKsBufferPropertySetImpl_AddRef
(
LPKSPROPERTYSET
iface
)
{
IKsBufferPropertySetImpl
*
This
=
(
IKsBufferPropertySetImpl
*
)
iface
;
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
ulReturn
=
InterlockedIncrement
(
&
(
This
->
ref
));
return
ulReturn
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
IKsBufferPropertySetImpl_Release
(
LPKSPROPERTYSET
iface
)
...
...
@@ -87,7 +84,7 @@ static ULONG WINAPI IKsBufferPropertySetImpl_Release(LPKSPROPERTYSET iface)
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
if
(
!
ulReturn
)
{
This
->
dsb
->
iks
=
0
;
IDirectSoundBuffer_Release
((
LPDIRECTSOUND3DBUFFER
)
This
->
dsb
);
...
...
@@ -249,11 +246,9 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QueryInterface(
static
ULONG
WINAPI
IKsPrivatePropertySetImpl_AddRef
(
LPKSPROPERTYSET
iface
)
{
IKsPrivatePropertySetImpl
*
This
=
(
IKsPrivatePropertySetImpl
*
)
iface
;
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
ulReturn
=
InterlockedIncrement
(
&
This
->
ref
);
return
ulReturn
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
ULONG
WINAPI
IKsPrivatePropertySetImpl_Release
(
LPKSPROPERTYSET
iface
)
...
...
@@ -262,7 +257,11 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
));
if
(
ulReturn
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
TRACE
(
"(%p) released
\n
"
,
This
);
}
return
ulReturn
;
}
...
...
dlls/dsound/sound3d.c
View file @
b970aeb4
...
...
@@ -382,7 +382,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_AddRef(LPDIRECTSOUND3DBUFFER iface)
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
This
->
ref
);
ref
=
InterlockedIncrement
(
&
(
This
->
ref
)
);
if
(
!
ref
)
{
FIXME
(
"thread-safety alert! AddRef-ing with a zero refcount!
\n
"
);
}
...
...
@@ -395,7 +395,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_Release(LPDIRECTSOUND3DBUFFER iface
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
if
(
!
ulReturn
)
{
This
->
dsb
->
ds3db
=
NULL
;
IDirectSoundBuffer_Release
((
LPDIRECTSOUNDBUFFER8
)
This
->
dsb
);
...
...
@@ -825,7 +825,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_AddRef(LPDIRECTSOUND3DLISTENER if
ULONG
ref
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ref
=
InterlockedIncrement
(
&
This
->
ref
);
ref
=
InterlockedIncrement
(
&
(
This
->
ref
)
);
if
(
!
ref
)
{
FIXME
(
"thread-safety alert! AddRef-ing with a zero refcount!
\n
"
);
...
...
@@ -840,7 +840,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_Release(LPDIRECTSOUND3DLISTENER i
ULONG
ulReturn
;
TRACE
(
"(%p) ref was %ld, thread is %04lx
\n
"
,
This
,
This
->
ref
,
GetCurrentThreadId
());
ulReturn
=
InterlockedDecrement
(
&
This
->
ref
);
ulReturn
=
InterlockedDecrement
(
&
(
This
->
ref
)
);
/* Free all resources */
if
(
ulReturn
==
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment