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
3838a770
Commit
3838a770
authored
Aug 26, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Aug 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Make sure waveOutClose is only called when using mmsystem.
parent
ede59b0c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
primary.c
dlls/dsound/primary.c
+7
-3
No files found.
dlls/dsound/primary.c
View file @
3838a770
...
...
@@ -81,15 +81,16 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
(
LPVOID
*
)
&
(
device
->
hwbuf
));
if
(
err
!=
DS_OK
)
{
WARN
(
"IDsDriver_CreateSoundBuffer failed
, falling back to waveout
\n
"
);
WARN
(
"IDsDriver_CreateSoundBuffer failed
(%08x), falling back to waveout
\n
"
,
err
);
/* Wine-only: close wine directsound driver, then reopen without WAVE_DIRECTSOUND */
device
->
drvdesc
.
dwFlags
=
DSDDESC_DOMMSYSTEMOPEN
|
DSDDESC_DOMMSYSTEMSETFORMAT
;
IDsDriver_Close
(
device
->
driver
);
if
(
device
->
drvdesc
.
dwFlags
&
DSDDESC_DOMMSYSTEMOPEN
)
waveOutClose
(
device
->
hwo
);
IDsDriver_Release
(
device
->
driver
);
device
->
driver
=
NULL
;
device
->
buffer
=
NULL
;
device
->
hwo
=
0
;
device
->
drvdesc
.
dwFlags
=
DSDDESC_DOMMSYSTEMOPEN
|
DSDDESC_DOMMSYSTEMSETFORMAT
;
err
=
mmErr
(
waveOutOpen
(
&
(
device
->
hwo
),
device
->
drvdesc
.
dnDevNode
,
device
->
pwfx
,
(
DWORD_PTR
)
DSOUND_callback
,
(
DWORD
)
device
,
CALLBACK_FUNCTION
));
if
(
err
!=
DS_OK
)
{
...
...
@@ -207,8 +208,11 @@ static void DSOUND_PrimaryClose(DirectSoundDevice *device)
/* clear the queue */
device
->
pwqueue
=
0
;
}
else
{
if
(
IDsDriverBuffer_Release
(
device
->
hwbuf
)
==
0
)
ULONG
ref
=
IDsDriverBuffer_Release
(
device
->
hwbuf
);
if
(
!
ref
)
device
->
hwbuf
=
0
;
else
ERR
(
"Still %d references on primary buffer, refcount leak?
\n
"
,
ref
);
}
}
...
...
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