Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
frmdstryr
wine
Commits
5dcb879d
Commit
5dcb879d
authored
9 months ago
by
Davide Beatrici
Committed by
Alexandre Julliard
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
mmdevapi: Return errors early in adjust_timing().
parent
7053e0f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/mmdevapi/client.c
+5
-5
5 additions, 5 deletions
dlls/mmdevapi/client.c
with
5 additions
and
5 deletions
dlls/mmdevapi/client.c
+
5
−
5
View file @
5dcb879d
...
...
@@ -140,21 +140,21 @@ static HRESULT adjust_timing(struct audio_client *client,
const
WAVEFORMATEXTENSIBLE
*
fmtex
=
(
WAVEFORMATEXTENSIBLE
*
)
fmt
;
if
(
fmtex
->
Format
.
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
&&
(
fmtex
->
dwChannelMask
==
0
||
fmtex
->
dwChannelMask
&
SPEAKER_RESERVED
))
hr
=
AUDCLNT_E_UNSUPPORTED_FORMAT
;
return
AUDCLNT_E_UNSUPPORTED_FORMAT
;
else
{
if
(
*
period
==
0
)
*
period
=
def_period
;
if
(
*
period
<
min_period
||
*
period
>
5000000
)
hr
=
AUDCLNT_E_INVALID_DEVICE_PERIOD
;
return
AUDCLNT_E_INVALID_DEVICE_PERIOD
;
else
if
(
*
duration
>
20000000
)
/* The smaller the period, the lower this limit. */
hr
=
AUDCLNT_E_BUFFER_SIZE_ERROR
;
return
AUDCLNT_E_BUFFER_SIZE_ERROR
;
else
if
(
flags
&
AUDCLNT_STREAMFLAGS_EVENTCALLBACK
)
{
if
(
*
duration
!=
*
period
)
hr
=
AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL
;
return
AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL
;
FIXME
(
"EXCLUSIVE mode with EVENTCALLBACK
\n
"
);
hr
=
AUDCLNT_E_DEVICE_IN_USE
;
return
AUDCLNT_E_DEVICE_IN_USE
;
}
else
if
(
*
duration
<
8
*
*
period
)
*
duration
=
8
*
*
period
;
/* May grow above 2s. */
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment