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
00684f84
Commit
00684f84
authored
Sep 08, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Oct 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: IsFormatSupported EXCLUSIVE mode never returns S_FALSE.
parent
41c6ffea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
13 deletions
+19
-13
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+7
-1
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+3
-5
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+9
-7
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
00684f84
...
...
@@ -1204,8 +1204,11 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
dump_fmt
(
fmt
);
if
(
out
)
if
(
out
)
{
*
out
=
NULL
;
if
(
mode
!=
AUDCLNT_SHAREMODE_SHARED
)
out
=
NULL
;
}
EnterCriticalSection
(
&
This
->
lock
);
...
...
@@ -1339,6 +1342,9 @@ exit:
LeaveCriticalSection
(
&
This
->
lock
);
HeapFree
(
GetProcessHeap
(),
0
,
formats
);
if
(
hr
==
S_FALSE
&&
!
out
)
hr
=
AUDCLNT_E_UNSUPPORTED_FORMAT
;
if
(
hr
==
S_FALSE
&&
out
)
{
closest
->
nBlockAlign
=
closest
->
nChannels
*
closest
->
wBitsPerSample
/
8
;
...
...
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
00684f84
...
...
@@ -1145,6 +1145,9 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
dump_fmt
(
pwfx
);
if
(
outpwfx
)
*
outpwfx
=
NULL
;
if
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
&&
fmtex
->
dwChannelMask
!=
0
&&
fmtex
->
dwChannelMask
!=
get_channel_mask
(
pwfx
->
nChannels
))
...
...
@@ -1156,17 +1159,12 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
if
(
SUCCEEDED
(
hr
)){
AudioQueueDispose
(
aqueue
,
1
);
OSSpinLockUnlock
(
&
This
->
lock
);
if
(
outpwfx
)
*
outpwfx
=
NULL
;
TRACE
(
"returning %08x
\n
"
,
S_OK
);
return
S_OK
;
}
OSSpinLockUnlock
(
&
This
->
lock
);
if
(
outpwfx
)
*
outpwfx
=
NULL
;
TRACE
(
"returning %08x
\n
"
,
AUDCLNT_E_UNSUPPORTED_FORMAT
);
return
AUDCLNT_E_UNSUPPORTED_FORMAT
;
}
...
...
dlls/wineoss.drv/mmdevdrv.c
View file @
00684f84
...
...
@@ -714,9 +714,6 @@ static HRESULT setup_oss_device(int fd, 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
;
...
...
@@ -767,6 +764,9 @@ static HRESULT setup_oss_device(int fd, const WAVEFORMATEX *fmt,
ret
=
S_FALSE
;
}
if
(
ret
==
S_FALSE
&&
!
out
)
ret
=
AUDCLNT_E_UNSUPPORTED_FORMAT
;
if
(
ret
==
S_FALSE
&&
out
){
closest
->
nBlockAlign
=
closest
->
nChannels
*
closest
->
wBitsPerSample
/
8
;
...
...
@@ -901,10 +901,6 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
}
hr
=
setup_oss_device
(
This
->
fd
,
fmt
,
NULL
,
FALSE
);
if
(
hr
==
S_FALSE
){
LeaveCriticalSection
(
&
This
->
lock
);
return
AUDCLNT_E_UNSUPPORTED_FORMAT
;
}
if
(
FAILED
(
hr
)){
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
...
...
@@ -1137,6 +1133,12 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
dump_fmt
(
pwfx
);
if
(
outpwfx
){
*
outpwfx
=
NULL
;
if
(
mode
!=
AUDCLNT_SHAREMODE_SHARED
)
outpwfx
=
NULL
;
}
if
(
This
->
dataflow
==
eRender
)
fd
=
open
(
This
->
devnode
,
O_WRONLY
,
0
);
else
if
(
This
->
dataflow
==
eCapture
)
...
...
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