Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5959e1d4
Commit
5959e1d4
authored
Jan 16, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Use AddRef to set the refcounts at object creation.
parent
37df4671
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
buffer.c
dlls/dsound/buffer.c
+3
-2
primary.c
dlls/dsound/primary.c
+3
-2
No files found.
dlls/dsound/buffer.c
View file @
5959e1d4
...
...
@@ -900,8 +900,8 @@ HRESULT IDirectSoundBufferImpl_Create(
TRACE
(
"Created buffer at %p
\n
"
,
dsb
);
dsb
->
ref
=
1
;
dsb
->
numIfaces
=
1
;
dsb
->
ref
=
0
;
dsb
->
numIfaces
=
0
;
dsb
->
device
=
device
;
dsb
->
IDirectSoundBuffer8_iface
.
lpVtbl
=
&
dsbvt
;
dsb
->
iks
=
NULL
;
...
...
@@ -1012,6 +1012,7 @@ HRESULT IDirectSoundBufferImpl_Create(
}
}
IDirectSoundBuffer8_AddRef
(
&
dsb
->
IDirectSoundBuffer8_iface
);
*
pdsb
=
dsb
;
return
err
;
}
...
...
dlls/dsound/primary.c
View file @
5959e1d4
...
...
@@ -1218,9 +1218,9 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl *
return
DSERR_OUTOFMEMORY
;
}
dsb
->
ref
=
1
;
dsb
->
ref
=
0
;
dsb
->
ref3D
=
0
;
dsb
->
numIfaces
=
1
;
dsb
->
numIfaces
=
0
;
dsb
->
device
=
device
;
dsb
->
IDirectSoundBuffer8_iface
.
lpVtbl
=
(
IDirectSoundBuffer8Vtbl
*
)
&
dspbvt
;
dsb
->
IDirectSound3DListener_iface
.
lpVtbl
=
&
ds3dlvt
;
...
...
@@ -1253,6 +1253,7 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl *
device
->
pwfx
->
nBlockAlign
,
device
->
pwfx
->
wBitsPerSample
,
device
->
pwfx
->
cbSize
);
IDirectSoundBuffer_AddRef
(
&
dsb
->
IDirectSoundBuffer8_iface
);
*
ppdsb
=
dsb
;
return
S_OK
;
}
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