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
c745b528
Commit
c745b528
authored
Apr 22, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 22, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A bit more robust against wave???Open failures.
parent
90b71b51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
dsound_main.c
dlls/dsound/dsound_main.c
+14
-11
No files found.
dlls/dsound/dsound_main.c
View file @
c745b528
...
...
@@ -1186,12 +1186,13 @@ static HRESULT DSOUND_PrimaryStop(IDirectSoundBufferImpl *dsb)
IDsDriverBuffer_Release
(
primarybuf
->
hwbuf
);
waveOutClose
(
dsb
->
dsound
->
hwo
);
dsb
->
dsound
->
hwo
=
0
;
waveOutOpen
(
&
(
dsb
->
dsound
->
hwo
),
dsb
->
dsound
->
drvdesc
.
dnDevNode
,
&
(
primarybuf
->
wfx
),
(
DWORD
)
DSOUND_callback
,
(
DWORD
)
dsb
->
dsound
,
CALLBACK_FUNCTION
|
WAVE_DIRECTSOUND
);
err
=
IDsDriver_CreateSoundBuffer
(
dsb
->
dsound
->
driver
,
&
(
dsb
->
wfx
),
dsb
->
dsbd
.
dwFlags
,
0
,
&
(
dsb
->
buflen
),
&
(
dsb
->
buffer
),
(
LPVOID
)
&
(
dsb
->
hwbuf
));
err
=
mmErr
(
waveOutOpen
(
&
(
dsb
->
dsound
->
hwo
),
dsb
->
dsound
->
drvdesc
.
dnDevNode
,
&
(
primarybuf
->
wfx
),
(
DWORD
)
DSOUND_callback
,
(
DWORD
)
dsb
->
dsound
,
CALLBACK_FUNCTION
|
WAVE_DIRECTSOUND
));
if
(
err
==
DS_OK
)
err
=
IDsDriver_CreateSoundBuffer
(
dsb
->
dsound
->
driver
,
&
(
dsb
->
wfx
),
dsb
->
dsbd
.
dwFlags
,
0
,
&
(
dsb
->
buflen
),
&
(
dsb
->
buffer
),
(
LPVOID
)
&
(
dsb
->
hwbuf
));
}
}
else
...
...
@@ -1253,10 +1254,11 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFormat(
DSOUND_PrimaryClose
(
primarybuf
);
waveOutClose
(
This
->
dsound
->
hwo
);
This
->
dsound
->
hwo
=
0
;
waveOutOpen
(
&
(
This
->
dsound
->
hwo
),
This
->
dsound
->
drvdesc
.
dnDevNode
,
&
(
primarybuf
->
wfx
),
(
DWORD
)
DSOUND_callback
,
(
DWORD
)
This
->
dsound
,
CALLBACK_FUNCTION
|
WAVE_DIRECTSOUND
);
DSOUND_PrimaryOpen
(
primarybuf
);
err
=
mmErr
(
waveOutOpen
(
&
(
This
->
dsound
->
hwo
),
This
->
dsound
->
drvdesc
.
dnDevNode
,
&
(
primarybuf
->
wfx
),
(
DWORD
)
DSOUND_callback
,
(
DWORD
)
This
->
dsound
,
CALLBACK_FUNCTION
|
WAVE_DIRECTSOUND
));
if
(
err
==
DS_OK
)
DSOUND_PrimaryOpen
(
primarybuf
);
}
if
(
primarybuf
->
hwbuf
)
{
err
=
IDsDriverBuffer_SetFormat
(
primarybuf
->
hwbuf
,
&
(
primarybuf
->
wfx
));
...
...
@@ -1269,13 +1271,14 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFormat(
if
(
primarybuf
->
state
==
STATE_PLAYING
)
primarybuf
->
state
=
STATE_STARTING
;
else
if
(
primarybuf
->
state
==
STATE_STOPPING
)
primarybuf
->
state
=
STATE_STOPPED
;
}
/* FIXME: should we set err back to DS_OK in all cases ? */
}
DSOUND_RecalcFormat
(
primarybuf
);
LeaveCriticalSection
(
&
(
This
->
dsound
->
lock
));
/* **** */
return
DS_OK
;
return
err
;
}
static
HRESULT
WINAPI
IDirectSoundBufferImpl_SetVolume
(
...
...
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