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
223a442d
Commit
223a442d
authored
Sep 17, 2003
by
Oleg Prokhorov
Committed by
Alexandre Julliard
Sep 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid crash if invalid rate was specified.
parent
f2cac81a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
audio.c
dlls/winmm/winealsa/audio.c
+10
-1
No files found.
dlls/winmm/winealsa/audio.c
View file @
223a442d
...
...
@@ -1849,8 +1849,13 @@ static HRESULT WINAPI IDsDriverBufferImpl_GetPosition(PIDSDRIVERBUFFER iface,
ICOM_THIS
(
IDsDriverBufferImpl
,
iface
);
WINE_WAVEOUT
*
wwo
=
&
(
WOutDev
[
This
->
drv
->
wDevID
]);
snd_pcm_uframes_t
hw_ptr
;
snd_pcm_uframes_t
period_size
=
snd_pcm_hw_params_get_period_size
(
wwo
->
hw_params
,
0
);
snd_pcm_uframes_t
period_size
;
if
(
wwo
->
hw_params
==
NULL
)
return
DSERR_GENERIC
;
period_size
=
snd_pcm_hw_params_get_period_size
(
wwo
->
hw_params
,
0
);
if
(
wwo
->
p_handle
==
NULL
)
return
DSERR_GENERIC
;
/** we need to track down buffer underruns */
DSDB_CheckXRUN
(
This
);
...
...
@@ -1875,6 +1880,8 @@ static HRESULT WINAPI IDsDriverBufferImpl_Play(PIDSDRIVERBUFFER iface, DWORD dwR
TRACE
(
"(%p,%lx,%lx,%lx)
\n
"
,
iface
,
dwRes1
,
dwRes2
,
dwFlags
);
if
(
wwo
->
p_handle
==
NULL
)
return
DSERR_GENERIC
;
state
=
snd_pcm_state
(
wwo
->
p_handle
);
if
(
state
==
SND_PCM_STATE_SETUP
)
{
...
...
@@ -1899,6 +1906,8 @@ static HRESULT WINAPI IDsDriverBufferImpl_Stop(PIDSDRIVERBUFFER iface)
TRACE
(
"(%p)
\n
"
,
iface
);
if
(
wwo
->
p_handle
==
NULL
)
return
DSERR_GENERIC
;
/* ring buffer wrap up detection */
IDsDriverBufferImpl_GetPosition
(
iface
,
&
play
,
&
write
);
if
(
play
>
write
)
...
...
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