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
669b79b8
Commit
669b79b8
authored
Oct 19, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Oct 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change secondary buffer variable name to secondary.
Fix AddRef and Release to use proper class.
parent
9cf9e5e7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
buffer.c
dlls/dsound/buffer.c
+12
-12
dsound.c
dlls/dsound/dsound.c
+3
-3
dsound_private.h
dlls/dsound/dsound_private.h
+1
-1
No files found.
dlls/dsound/buffer.c
View file @
669b79b8
...
@@ -898,11 +898,11 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
...
@@ -898,11 +898,11 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectSoundBuffer
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectSoundBuffer
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectSoundBuffer8
)
)
{
IsEqualGUID
(
riid
,
&
IID_IDirectSoundBuffer8
)
)
{
if
(
!
This
->
dsb
)
if
(
!
This
->
secondary
)
SecondaryBufferImpl_Create
(
This
,
&
(
This
->
dsb
));
SecondaryBufferImpl_Create
(
This
,
&
(
This
->
secondary
));
if
(
This
->
dsb
)
{
if
(
This
->
secondary
)
{
IDirectSoundBuffer8_AddRef
((
LPDIRECTSOUNDBUFFER8
)
This
->
dsb
);
IDirectSoundBuffer8_AddRef
((
LPDIRECTSOUNDBUFFER8
)
This
->
secondary
);
*
ppobj
=
This
->
dsb
;
*
ppobj
=
This
->
secondary
;
return
S_OK
;
return
S_OK
;
}
}
WARN
(
"IID_IDirectSoundBuffer
\n
"
);
WARN
(
"IID_IDirectSoundBuffer
\n
"
);
...
@@ -1012,7 +1012,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
...
@@ -1012,7 +1012,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
TRACE
(
"Created buffer at %p
\n
"
,
dsb
);
TRACE
(
"Created buffer at %p
\n
"
,
dsb
);
dsb
->
ref
=
0
;
dsb
->
ref
=
0
;
dsb
->
dsb
=
0
;
dsb
->
secondary
=
0
;
dsb
->
dsound
=
ds
;
dsb
->
dsound
=
ds
;
dsb
->
lpVtbl
=
&
dsbvt
;
dsb
->
lpVtbl
=
&
dsbvt
;
dsb
->
iks
=
NULL
;
dsb
->
iks
=
NULL
;
...
@@ -1200,10 +1200,10 @@ HRESULT WINAPI IDirectSoundBufferImpl_Destroy(
...
@@ -1200,10 +1200,10 @@ HRESULT WINAPI IDirectSoundBufferImpl_Destroy(
pdsb
->
notify
=
NULL
;
pdsb
->
notify
=
NULL
;
}
}
if
(
pdsb
->
dsb
)
{
if
(
pdsb
->
secondary
)
{
WARN
(
"dsb not NULL
\n
"
);
WARN
(
"dsb not NULL
\n
"
);
SecondaryBufferImpl_Destroy
(
pdsb
->
dsb
);
SecondaryBufferImpl_Destroy
(
pdsb
->
secondary
);
pdsb
->
dsb
=
NULL
;
pdsb
->
secondary
=
NULL
;
}
}
while
(
IDirectSoundBuffer8_Release
((
LPDIRECTSOUNDBUFFER8
)
pdsb
)
>
0
);
while
(
IDirectSoundBuffer8_Release
((
LPDIRECTSOUNDBUFFER8
)
pdsb
)
>
0
);
...
@@ -1226,7 +1226,7 @@ static HRESULT WINAPI SecondaryBufferImpl_QueryInterface(
...
@@ -1226,7 +1226,7 @@ static HRESULT WINAPI SecondaryBufferImpl_QueryInterface(
static
ULONG
WINAPI
SecondaryBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
static
ULONG
WINAPI
SecondaryBufferImpl_AddRef
(
LPDIRECTSOUNDBUFFER8
iface
)
{
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSound
BufferImpl
*
)
iface
;
SecondaryBufferImpl
*
This
=
(
Secondary
BufferImpl
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
ULONG
ref
=
InterlockedIncrement
(
&
(
This
->
ref
));
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
ref
-
1
);
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
ref
-
1
);
return
ref
;
return
ref
;
...
@@ -1234,12 +1234,12 @@ static ULONG WINAPI SecondaryBufferImpl_AddRef(LPDIRECTSOUNDBUFFER8 iface)
...
@@ -1234,12 +1234,12 @@ static ULONG WINAPI SecondaryBufferImpl_AddRef(LPDIRECTSOUNDBUFFER8 iface)
static
ULONG
WINAPI
SecondaryBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
static
ULONG
WINAPI
SecondaryBufferImpl_Release
(
LPDIRECTSOUNDBUFFER8
iface
)
{
{
IDirectSoundBufferImpl
*
This
=
(
IDirectSound
BufferImpl
*
)
iface
;
SecondaryBufferImpl
*
This
=
(
Secondary
BufferImpl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
(
This
->
ref
));
ULONG
ref
=
InterlockedDecrement
(
&
(
This
->
ref
));
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
ref
+
1
);
TRACE
(
"(%p) ref was %ld
\n
"
,
This
,
ref
+
1
);
if
(
!
ref
)
{
if
(
!
ref
)
{
This
->
dsb
->
dsb
=
NULL
;
This
->
dsb
->
secondary
=
NULL
;
IDirectSoundBuffer_Release
((
LPDIRECTSOUNDBUFFER8
)
This
->
dsb
);
IDirectSoundBuffer_Release
((
LPDIRECTSOUNDBUFFER8
)
This
->
dsb
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
TRACE
(
"(%p) released
\n
"
,
This
);
TRACE
(
"(%p) released
\n
"
,
This
);
...
...
dlls/dsound/dsound.c
View file @
669b79b8
...
@@ -366,7 +366,7 @@ static HRESULT WINAPI DSOUND_CreateSoundBuffer(
...
@@ -366,7 +366,7 @@ static HRESULT WINAPI DSOUND_CreateSoundBuffer(
if
(
dsb
)
{
if
(
dsb
)
{
hres
=
SecondaryBufferImpl_Create
(
dsb
,
(
SecondaryBufferImpl
**
)
ppdsb
);
hres
=
SecondaryBufferImpl_Create
(
dsb
,
(
SecondaryBufferImpl
**
)
ppdsb
);
if
(
*
ppdsb
)
{
if
(
*
ppdsb
)
{
dsb
->
dsb
=
(
SecondaryBufferImpl
*
)
*
ppdsb
;
dsb
->
secondary
=
(
SecondaryBufferImpl
*
)
*
ppdsb
;
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER
)
*
ppdsb
);
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER
)
*
ppdsb
);
}
else
}
else
WARN
(
"SecondaryBufferImpl_Create failed
\n
"
);
WARN
(
"SecondaryBufferImpl_Create failed
\n
"
);
...
@@ -535,7 +535,7 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
...
@@ -535,7 +535,7 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
dsb
->
dsound
=
This
;
dsb
->
dsound
=
This
;
dsb
->
ds3db
=
NULL
;
dsb
->
ds3db
=
NULL
;
dsb
->
iks
=
NULL
;
/* FIXME? */
dsb
->
iks
=
NULL
;
/* FIXME? */
dsb
->
dsb
=
NULL
;
dsb
->
secondary
=
NULL
;
/* variable sized struct so calculate size based on format */
/* variable sized struct so calculate size based on format */
size
=
sizeof
(
WAVEFORMATEX
)
+
pdsb
->
pwfx
->
cbSize
;
size
=
sizeof
(
WAVEFORMATEX
)
+
pdsb
->
pwfx
->
cbSize
;
...
@@ -567,7 +567,7 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
...
@@ -567,7 +567,7 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
}
else
{
}
else
{
hres
=
SecondaryBufferImpl_Create
(
dsb
,
(
SecondaryBufferImpl
**
)
ppdsb
);
hres
=
SecondaryBufferImpl_Create
(
dsb
,
(
SecondaryBufferImpl
**
)
ppdsb
);
if
(
*
ppdsb
)
{
if
(
*
ppdsb
)
{
dsb
->
dsb
=
(
SecondaryBufferImpl
*
)
*
ppdsb
;
dsb
->
secondary
=
(
SecondaryBufferImpl
*
)
*
ppdsb
;
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER8
)
*
ppdsb
);
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER8
)
*
ppdsb
);
}
else
}
else
WARN
(
"SecondaryBufferImpl_Create failed
\n
"
);
WARN
(
"SecondaryBufferImpl_Create failed
\n
"
);
...
...
dlls/dsound/dsound_private.h
View file @
669b79b8
...
@@ -199,7 +199,7 @@ struct IDirectSoundBufferImpl
...
@@ -199,7 +199,7 @@ struct IDirectSoundBufferImpl
const
IDirectSoundBuffer8Vtbl
*
lpVtbl
;
const
IDirectSoundBuffer8Vtbl
*
lpVtbl
;
LONG
ref
;
LONG
ref
;
/* IDirectSoundBufferImpl fields */
/* IDirectSoundBufferImpl fields */
SecondaryBufferImpl
*
dsb
;
SecondaryBufferImpl
*
secondary
;
IDirectSoundImpl
*
dsound
;
IDirectSoundImpl
*
dsound
;
CRITICAL_SECTION
lock
;
CRITICAL_SECTION
lock
;
PIDSDRIVERBUFFER
hwbuf
;
PIDSDRIVERBUFFER
hwbuf
;
...
...
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