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
6a6e1bd5
Commit
6a6e1bd5
authored
Mar 27, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Mar 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Support DRVM_MAPPER_PREFERRED_GET in waveXxxMessage.
parent
d2348911
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
capture.c
dlls/winmm/tests/capture.c
+10
-0
wave.c
dlls/winmm/tests/wave.c
+9
-0
waveform.c
dlls/winmm/waveform.c
+28
-0
No files found.
dlls/winmm/tests/capture.c
View file @
6a6e1bd5
...
...
@@ -27,6 +27,7 @@
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "mmddk.h"
#include "mmsystem.h"
#define NOBITMAP
#include "mmreg.h"
...
...
@@ -639,11 +640,20 @@ static void wave_in_tests(void)
WAVEFORMATEX
format
;
HWAVEIN
win
;
MMRESULT
rc
;
DWORD
preferred
,
status
;
UINT
ndev
,
d
;
ndev
=
waveInGetNumDevs
();
trace
(
"found %d WaveIn devices
\n
"
,
ndev
);
rc
=
waveInMessage
((
HWAVEIN
)
WAVE_MAPPER
,
DRVM_MAPPER_PREFERRED_GET
,
(
DWORD_PTR
)
&
preferred
,
(
DWORD_PTR
)
&
status
);
ok
((
ndev
==
0
&&
rc
==
MMSYSERR_NODRIVER
)
||
rc
==
MMSYSERR_NOERROR
,
"waveInMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u
\n
"
,
rc
);
ok
((
ndev
==
0
&&
(
preferred
==
-
1
||
broken
(
preferred
!=
-
1
)))
||
preferred
<
ndev
,
"Got invalid preferred device: 0x%x
\n
"
,
preferred
);
rc
=
waveInGetDevCapsA
(
ndev
+
1
,
&
capsA
,
sizeof
(
capsA
));
ok
(
rc
==
MMSYSERR_BADDEVICEID
,
"waveInGetDevCapsA(%s): MMSYSERR_BADDEVICEID expected, got %s
\n
"
,
...
...
dlls/winmm/tests/wave.c
View file @
6a6e1bd5
...
...
@@ -1378,11 +1378,20 @@ static void wave_out_tests(void)
WAVEFORMATEX
format
;
HWAVEOUT
wout
;
MMRESULT
rc
;
DWORD
preferred
,
status
;
UINT
ndev
,
d
;
ndev
=
waveOutGetNumDevs
();
trace
(
"found %d WaveOut devices
\n
"
,
ndev
);
rc
=
waveOutMessage
((
HWAVEOUT
)
WAVE_MAPPER
,
DRVM_MAPPER_PREFERRED_GET
,
(
DWORD_PTR
)
&
preferred
,
(
DWORD_PTR
)
&
status
);
ok
((
ndev
==
0
&&
rc
==
MMSYSERR_NODRIVER
)
||
rc
==
MMSYSERR_NOERROR
,
"waveOutMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u
\n
"
,
rc
);
ok
((
ndev
==
0
&&
(
preferred
==
-
1
||
broken
(
preferred
!=
-
1
)))
||
preferred
<
ndev
,
"Got invalid preferred device: 0x%x
\n
"
,
preferred
);
rc
=
waveOutGetDevCapsA
(
ndev
+
1
,
&
capsA
,
sizeof
(
capsA
));
ok
(
rc
==
MMSYSERR_BADDEVICEID
,
"waveOutGetDevCapsA(%s): MMSYSERR_BADDEVICEID expected, got %s
\n
"
,
...
...
dlls/winmm/waveform.c
View file @
6a6e1bd5
...
...
@@ -2797,6 +2797,20 @@ UINT WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage,
return
WINMM_QueryInstanceID
(
HandleToULong
(
hWaveOut
),
(
WCHAR
*
)
dwParam1
,
dwParam2
,
TRUE
);
case
DRV_QUERYMAPPABLE
:
return
MMSYSERR_NOERROR
;
case
DRVM_MAPPER_PREFERRED_GET
:
if
(
dwParam1
)
{
if
(
g_outmmdevices_count
>
0
)
/* Device 0 is always the default device */
*
(
DWORD
*
)
dwParam1
=
0
;
else
*
(
DWORD
*
)
dwParam1
=
-
1
;
}
if
(
dwParam2
)
/* Status flags */
*
(
DWORD
*
)
dwParam2
=
0
;
return
MMSYSERR_NOERROR
;
}
TRACE
(
"Message not supported: %u
\n
"
,
uMessage
);
...
...
@@ -3173,6 +3187,20 @@ UINT WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage,
return
WINMM_QueryInstanceID
(
HandleToULong
(
hWaveIn
),
(
WCHAR
*
)
dwParam1
,
dwParam2
,
FALSE
);
case
DRV_QUERYMAPPABLE
:
return
MMSYSERR_NOERROR
;
case
DRVM_MAPPER_PREFERRED_GET
:
if
(
dwParam1
)
{
if
(
g_inmmdevices_count
>
0
)
/* Device 0 is always the default device */
*
(
DWORD
*
)
dwParam1
=
0
;
else
*
(
DWORD
*
)
dwParam1
=
-
1
;
}
if
(
dwParam2
)
/* Status flags */
*
(
DWORD
*
)
dwParam2
=
0
;
return
MMSYSERR_NOERROR
;
}
TRACE
(
"Message not supported: %u
\n
"
,
uMessage
);
...
...
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