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
41c6ffea
Commit
41c6ffea
authored
Aug 21, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Oct 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Release buffer memory.
parent
ecc4d872
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+14
-3
No files found.
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
41c6ffea
...
...
@@ -509,16 +509,27 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) Refcount now %u
\n
"
,
This
,
ref
);
if
(
!
ref
){
IAudioClient_Stop
(
iface
);
if
(
This
->
aqueue
)
if
(
This
->
aqueue
){
AQBuffer
*
buf
,
*
next
;
if
(
This
->
public_buffer
){
buf
=
This
->
public_buffer
->
mUserData
;
list_add_tail
(
&
This
->
avail_buffers
,
&
buf
->
entry
);
}
IAudioClient_Stop
(
iface
);
AudioQueueStop
(
This
->
aqueue
,
1
);
/* Stopped synchronously, all buffers returned. */
LIST_FOR_EACH_ENTRY_SAFE
(
buf
,
next
,
&
This
->
avail_buffers
,
AQBuffer
,
entry
){
AudioQueueFreeBuffer
(
This
->
aqueue
,
buf
->
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
AudioQueueDispose
(
This
->
aqueue
,
1
);
}
if
(
This
->
session
){
EnterCriticalSection
(
&
g_sessions_lock
);
list_remove
(
&
This
->
entry
);
LeaveCriticalSection
(
&
g_sessions_lock
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
vols
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
public_buffer
);
CoTaskMemFree
(
This
->
fmt
);
IMMDevice_Release
(
This
->
parent
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
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