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
3e1d4028
Commit
3e1d4028
authored
Aug 02, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Sep 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: IsFormatSupported fills closest match iff it returns S_FALSE.
parent
03d4ef95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+6
-6
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+8
-6
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
3e1d4028
...
...
@@ -1189,6 +1189,9 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
dump_fmt
(
fmt
);
if
(
out
)
*
out
=
NULL
;
EnterCriticalSection
(
&
This
->
lock
);
if
((
err
=
snd_pcm_hw_params_any
(
This
->
pcm_handle
,
This
->
hw_params
))
<
0
){
...
...
@@ -1320,17 +1323,14 @@ exit:
LeaveCriticalSection
(
&
This
->
lock
);
HeapFree
(
GetProcessHeap
(),
0
,
formats
);
if
(
hr
==
S_OK
||
!
out
){
CoTaskMemFree
(
closest
);
if
(
out
)
*
out
=
NULL
;
}
else
if
(
closest
){
if
(
hr
==
S_FALSE
&&
out
)
{
closest
->
nBlockAlign
=
closest
->
nChannels
*
closest
->
wBitsPerSample
/
8
;
closest
->
nAvgBytesPerSec
=
closest
->
nBlockAlign
*
closest
->
nSamplesPerSec
;
*
out
=
closest
;
}
}
else
CoTaskMemFree
(
closest
);
TRACE
(
"returning: %08x
\n
"
,
hr
);
return
hr
;
...
...
dlls/wineoss.drv/mmdevdrv.c
View file @
3e1d4028
...
...
@@ -676,6 +676,9 @@ static HRESULT setup_oss_device(ACImpl *This, const WAVEFORMATEX *fmt,
WAVEFORMATEXTENSIBLE
*
fmtex
=
(
void
*
)
fmt
;
WAVEFORMATEX
*
closest
=
NULL
;
if
(
out
)
*
out
=
NULL
;
tmp
=
oss_format
=
get_oss_format
(
fmt
);
if
(
oss_format
<
0
)
return
AUDCLNT_E_UNSUPPORTED_FORMAT
;
...
...
@@ -689,6 +692,8 @@ static HRESULT setup_oss_device(ACImpl *This, const WAVEFORMATEX *fmt,
}
closest
=
clone_format
(
fmt
);
if
(
!
closest
)
return
E_OUTOFMEMORY
;
tmp
=
fmt
->
nSamplesPerSec
;
if
(
ioctl
(
This
->
fd
,
SNDCTL_DSP_SPEED
,
&
tmp
)
<
0
){
...
...
@@ -723,17 +728,14 @@ static HRESULT setup_oss_device(ACImpl *This, const WAVEFORMATEX *fmt,
ret
=
S_FALSE
;
}
if
(
ret
==
S_OK
||
!
out
){
CoTaskMemFree
(
closest
);
if
(
out
)
*
out
=
NULL
;
}
else
{
if
(
ret
==
S_FALSE
&&
out
){
closest
->
nBlockAlign
=
closest
->
nChannels
*
closest
->
wBitsPerSample
/
8
;
closest
->
nAvgBytesPerSec
=
closest
->
nBlockAlign
*
closest
->
nSamplesPerSec
;
*
out
=
closest
;
}
}
else
CoTaskMemFree
(
closest
);
TRACE
(
"returning: %08x
\n
"
,
ret
);
return
ret
;
...
...
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