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
58bd4057
Commit
58bd4057
authored
Jul 13, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Jul 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Support WAVE_MAPPED flag in waveOut*.
parent
ca4ee7f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
13 deletions
+31
-13
waveform.c
dlls/winmm/waveform.c
+31
-13
No files found.
dlls/winmm/waveform.c
View file @
58bd4057
...
...
@@ -615,6 +615,11 @@ static UINT WAVE_Open(HANDLE* lphndl, UINT uDeviceID, UINT uType,
return
dwRet
;
}
static
inline
BOOL
WINMM_IsMapper
(
UINT
device
)
{
return
(
device
==
WAVE_MAPPER
||
device
==
(
UINT16
)
WAVE_MAPPER
);
}
static
MMRESULT
WINMM_TryDeviceMapping
(
WINMM_OpenInfo
*
info
,
WORD
channels
,
DWORD
freq
,
DWORD
bits_per_samp
,
BOOL
is_out
)
{
...
...
@@ -644,15 +649,24 @@ static MMRESULT WINMM_TryDeviceMapping(WINMM_OpenInfo *info, WORD channels,
/* ACM can convert from src->dst, so try to find a device
* that supports dst */
for
(
i
=
0
;
i
<
g_outmmdevices_count
;
++
i
){
if
(
WINMM_IsMapper
(
info
->
req_device
)){
for
(
i
=
0
;
i
<
g_outmmdevices_count
;
++
i
){
WINMM_OpenInfo
l_info
=
*
info
;
l_info
.
req_device
=
i
;
l_info
.
format
=
&
target
;
mr
=
WOD_Open
(
&
l_info
);
if
(
mr
==
MMSYSERR_NOERROR
){
info
->
handle
=
l_info
.
handle
;
break
;
}
}
}
else
{
WINMM_OpenInfo
l_info
=
*
info
;
l_info
.
req_device
=
i
;
l_info
.
flags
&=
~
WAVE_MAPPED
;
l_info
.
format
=
&
target
;
mr
=
WOD_Open
(
&
l_info
);
if
(
mr
==
MMSYSERR_NOERROR
)
{
if
(
mr
==
MMSYSERR_NOERROR
)
info
->
handle
=
l_info
.
handle
;
break
;
}
}
if
(
mr
!=
MMSYSERR_NOERROR
)
return
WAVERR_BADFORMAT
;
...
...
@@ -684,8 +698,17 @@ static MMRESULT WINMM_MapDevice(WINMM_OpenInfo *info, BOOL is_out)
/* try to find a direct match */
if
(
is_out
){
WINMM_OpenInfo
l_info
=
*
info
;
for
(
i
=
0
;
i
<
g_outmmdevices_count
;
++
i
){
l_info
.
req_device
=
i
;
if
(
WINMM_IsMapper
(
info
->
req_device
)){
for
(
i
=
0
;
i
<
g_outmmdevices_count
;
++
i
){
l_info
.
req_device
=
i
;
mr
=
WOD_Open
(
&
l_info
);
if
(
mr
==
MMSYSERR_NOERROR
){
info
->
handle
=
l_info
.
handle
;
return
mr
;
}
}
}
else
{
l_info
.
flags
&=
~
WAVE_MAPPED
;
mr
=
WOD_Open
(
&
l_info
);
if
(
mr
==
MMSYSERR_NOERROR
){
info
->
handle
=
l_info
.
handle
;
...
...
@@ -940,11 +963,6 @@ error:
return
ret
;
}
static
inline
BOOL
WINMM_IsMapper
(
UINT
device
)
{
return
(
device
==
WAVE_MAPPER
||
device
==
(
UINT16
)
WAVE_MAPPER
);
}
static
LRESULT
WOD_Open
(
WINMM_OpenInfo
*
info
)
{
WINMM_MMDevice
*
mmdevice
;
...
...
@@ -955,7 +973,7 @@ static LRESULT WOD_Open(WINMM_OpenInfo *info)
TRACE
(
"(%u, %p, %08x)
\n
"
,
info
->
req_device
,
info
,
info
->
flags
);
if
(
WINMM_IsMapper
(
info
->
req_device
))
if
(
WINMM_IsMapper
(
info
->
req_device
)
||
(
info
->
flags
&
WAVE_MAPPED
)
)
return
WINMM_MapDevice
(
info
,
TRUE
);
if
(
info
->
req_device
>=
g_outmmdevices_count
)
...
...
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