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
6da3ce27
Commit
6da3ce27
authored
Jan 28, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss.drv: Set reasonable defaults if driver reports invalid values.
parent
097dee60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+13
-2
No files found.
dlls/wineoss.drv/mmdevdrv.c
View file @
6da3ce27
...
@@ -1307,8 +1307,19 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient *iface,
...
@@ -1307,8 +1307,19 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient *iface,
return
E_FAIL
;
return
E_FAIL
;
}
}
fmt
->
Format
.
nChannels
=
This
->
ai
.
max_channels
;
/* some OSS drivers are buggy, so set reasonable defaults if
fmt
->
Format
.
nSamplesPerSec
=
This
->
ai
.
max_rate
;
* the reported values seem wacky */
fmt
->
Format
.
nChannels
=
max
(
This
->
ai
.
max_channels
,
This
->
ai
.
min_channels
);
if
(
fmt
->
Format
.
nChannels
==
0
||
fmt
->
Format
.
nChannels
>
8
)
fmt
->
Format
.
nChannels
=
2
;
if
(
This
->
ai
.
max_rate
==
0
)
fmt
->
Format
.
nSamplesPerSec
=
44100
;
else
fmt
->
Format
.
nSamplesPerSec
=
min
(
This
->
ai
.
max_rate
,
44100
);
if
(
fmt
->
Format
.
nSamplesPerSec
<
This
->
ai
.
min_rate
)
fmt
->
Format
.
nSamplesPerSec
=
This
->
ai
.
min_rate
;
fmt
->
dwChannelMask
=
get_channel_mask
(
fmt
->
Format
.
nChannels
);
fmt
->
dwChannelMask
=
get_channel_mask
(
fmt
->
Format
.
nChannels
);
fmt
->
Format
.
nBlockAlign
=
(
fmt
->
Format
.
wBitsPerSample
*
fmt
->
Format
.
nBlockAlign
=
(
fmt
->
Format
.
wBitsPerSample
*
...
...
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