Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bbc5244c
Commit
bbc5244c
authored
Jan 27, 2015
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Allow HMIXEROBJ handles in place of device IDs in mixerGetDevCaps.
parent
7b8dbc47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
mixer.c
dlls/winmm/tests/mixer.c
+16
-0
waveform.c
dlls/winmm/waveform.c
+12
-5
No files found.
dlls/winmm/tests/mixer.c
View file @
bbc5244c
...
@@ -395,6 +395,14 @@ static void mixer_test_deviceA(int device)
...
@@ -395,6 +395,14 @@ static void mixer_test_deviceA(int device)
ok
(
rc
==
MMSYSERR_NOERROR
,
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerOpen: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
"mixerOpen: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
if
(
rc
==
MMSYSERR_NOERROR
)
{
MIXERCAPSA
capsA2
;
rc
=
mixerGetDevCapsA
((
UINT_PTR
)
mix
,
&
capsA2
,
sizeof
(
capsA2
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetDevCapsA: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
ok
(
!
strcmp
(
capsA2
.
szPname
,
capsA
.
szPname
),
"Got wrong device caps
\n
"
);
for
(
d
=
0
;
d
<
capsA
.
cDestinations
;
d
++
)
{
for
(
d
=
0
;
d
<
capsA
.
cDestinations
;
d
++
)
{
MIXERLINEA
mixerlineA
;
MIXERLINEA
mixerlineA
;
mixerlineA
.
cbStruct
=
0
;
mixerlineA
.
cbStruct
=
0
;
...
@@ -771,6 +779,14 @@ static void mixer_test_deviceW(int device)
...
@@ -771,6 +779,14 @@ static void mixer_test_deviceW(int device)
ok
(
rc
==
MMSYSERR_NOERROR
,
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerOpen: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
"mixerOpen: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
if
(
rc
==
MMSYSERR_NOERROR
)
{
MIXERCAPSW
capsW2
;
rc
=
mixerGetDevCapsW
((
UINT_PTR
)
mix
,
&
capsW2
,
sizeof
(
capsW2
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"mixerGetDevCapsW: MMSYSERR_NOERROR expected, got %s
\n
"
,
mmsys_error
(
rc
));
ok
(
!
lstrcmpW
(
capsW2
.
szPname
,
capsW
.
szPname
),
"Got wrong device caps
\n
"
);
for
(
d
=
0
;
d
<
capsW
.
cDestinations
;
d
++
)
{
for
(
d
=
0
;
d
<
capsW
.
cDestinations
;
d
++
)
{
MIXERLINEW
mixerlineW
;
MIXERLINEW
mixerlineW
;
mixerlineW
.
cbStruct
=
0
;
mixerlineW
.
cbStruct
=
0
;
...
...
dlls/winmm/waveform.c
View file @
bbc5244c
...
@@ -122,6 +122,7 @@ struct _WINMM_MMDevice {
...
@@ -122,6 +122,7 @@ struct _WINMM_MMDevice {
WAVEOUTCAPSW
out_caps
;
/* must not be modified outside of WINMM_InitMMDevices*/
WAVEOUTCAPSW
out_caps
;
/* must not be modified outside of WINMM_InitMMDevices*/
WAVEINCAPSW
in_caps
;
/* must not be modified outside of WINMM_InitMMDevices*/
WAVEINCAPSW
in_caps
;
/* must not be modified outside of WINMM_InitMMDevices*/
WCHAR
*
dev_id
;
WCHAR
*
dev_id
;
EDataFlow
dataflow
;
ISimpleAudioVolume
*
volume
;
ISimpleAudioVolume
*
volume
;
...
@@ -510,6 +511,7 @@ static HRESULT WINMM_InitMMDevice(EDataFlow flow, IMMDevice *device,
...
@@ -510,6 +511,7 @@ static HRESULT WINMM_InitMMDevice(EDataFlow flow, IMMDevice *device,
{
{
HRESULT
hr
;
HRESULT
hr
;
dev
->
dataflow
=
flow
;
if
(
flow
==
eRender
){
if
(
flow
==
eRender
){
dev
->
out_caps
.
wMid
=
0xFF
;
dev
->
out_caps
.
wMid
=
0xFF
;
dev
->
out_caps
.
wPid
=
0xFF
;
dev
->
out_caps
.
wPid
=
0xFF
;
...
@@ -3749,15 +3751,20 @@ UINT WINAPI mixerGetDevCapsW(UINT_PTR uDeviceID, LPMIXERCAPSW lpCaps, UINT uSize
...
@@ -3749,15 +3751,20 @@ UINT WINAPI mixerGetDevCapsW(UINT_PTR uDeviceID, LPMIXERCAPSW lpCaps, UINT uSize
return
MMSYSERR_NOERROR
;
return
MMSYSERR_NOERROR
;
if
(
uDeviceID
>=
g_outmmdevices_count
+
g_inmmdevices_count
)
if
(
uDeviceID
>=
g_outmmdevices_count
+
g_inmmdevices_count
)
mmdevice
=
WINMM_GetMixerMMDevice
((
HMIXEROBJ
)
uDeviceID
,
MIXER_OBJECTF_MIXER
,
NULL
);
else
if
(
uDeviceID
<
g_outmmdevices_count
)
mmdevice
=
read_map
(
g_out_map
,
uDeviceID
);
else
mmdevice
=
read_map
(
g_in_map
,
uDeviceID
-
g_outmmdevices_count
);
if
(
!
mmdevice
)
return
MMSYSERR_BADDEVICEID
;
return
MMSYSERR_BADDEVICEID
;
if
(
uDeviceID
<
g_outmmdevices_count
){
if
(
mmdevice
->
dataflow
==
eRender
)
mmdevice
=
read_map
(
g_out_map
,
uDeviceID
);
memcpy
(
caps
.
szPname
,
mmdevice
->
out_caps
.
szPname
,
sizeof
(
caps
.
szPname
));
memcpy
(
caps
.
szPname
,
mmdevice
->
out_caps
.
szPname
,
sizeof
(
caps
.
szPname
));
}
else
{
else
mmdevice
=
read_map
(
g_in_map
,
uDeviceID
-
g_outmmdevices_count
);
memcpy
(
caps
.
szPname
,
mmdevice
->
in_caps
.
szPname
,
sizeof
(
caps
.
szPname
));
memcpy
(
caps
.
szPname
,
mmdevice
->
in_caps
.
szPname
,
sizeof
(
caps
.
szPname
));
}
caps
.
wMid
=
0xFF
;
caps
.
wMid
=
0xFF
;
caps
.
wPid
=
0xFF
;
caps
.
wPid
=
0xFF
;
...
...
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