41 static char flags[100];
68#define TYPE_TO_STR(x) case x: return #x
69 switch (dwComponentType) {
97#define TYPE_TO_STR(x) case x: return #x
112#define TYPE_TO_STR(x) case x: return #x
113 switch (dwControlType) {
152 static char flags[100];
183 "mixerClose: MMSYSERR_NOERROR or MMSYSERR_INVALHANDLE expected, got %s\n",
206 "mixerGetDevCapsA: MMSYSERR_INVALPARAM expected, got %s\n",
213 "MMSYSERR_NOERROR expected, got %s\n",
229 U(new_details).cMultipleItems = 0;
231 new_details.
cbDetails =
sizeof(new_value);
236 "MMSYSERR_NOERROR expected, got %s\n",
245 U(ret_details).cMultipleItems = 0;
247 ret_details.
cbDetails =
sizeof(ret_value);
252 "MMSYSERR_NOERROR expected, got %s\n",
257 "Couldn't change value from %d to %d, returned %d\n",
271 "MMSYSERR_NOERROR expected, got %s\n",
292 "MMSYSERR_NOERROR expected, got %s\n",
308 U(new_details).cMultipleItems = 0;
310 new_details.
cbDetails =
sizeof(new_value);
315 "MMSYSERR_NOERROR expected, got %s\n",
324 U(ret_details).cMultipleItems = 0;
326 ret_details.
cbDetails =
sizeof(ret_value);
331 "MMSYSERR_NOERROR expected, got %s\n",
336 "Couldn't change value from %d to %d, returned %d\n",
350 "MMSYSERR_NOERROR expected, got %s\n",
370 "mixerGetDevCapsA: MMSYSERR_INVALPARAM expected, got %s\n",
375 "mixerGetDevCapsA: MMSYSERR_NOERROR expected, got %s\n",
380 "mixerGetDevCapsA: MMSYSERR_NOERROR expected, got %s\n",
384 trace(
" %d: \"%s\" %d.%d (%d:%d) destinations=%d\n",
device,
396 "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",
mmsys_error(rc));
402 "mixerGetDevCapsA: MMSYSERR_NOERROR expected, got %s\n",
412 "mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
413 "MMSYSERR_INVALPARAM expected, got %s\n",
416 mixerlineA.
cbStruct =
sizeof(mixerlineA);
420 "mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
421 "MMSYSERR_INVALPARAM or MIXERR_INVALLINE expected, got %s\n",
424 mixerlineA.
cbStruct =
sizeof(mixerlineA);
428 "mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
429 "MMSYSERR_INVALPARAM expected, got %s\n",
432 mixerlineA.
cbStruct =
sizeof(mixerlineA);
436 "mixerGetLineInfoA(-1): MMSYSERR_INVALFLAG expected, got %s\n",
439 mixerlineA.
cbStruct =
sizeof(mixerlineA);
444 "mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
445 "MMSYSERR_NOERROR expected, got %s\n",
447 ok(mixerlineA.
dwUser == 0,
"dwUser was not reset\n");
449 trace(
" No Driver\n");
452 trace(
" %d: \"%s\" (%s) Destination=%d Source=%d\n",
455 trace(
" LineID=%08x Channels=%d "
456 "Connections=%d Controls=%d\n",
459 trace(
" State=0x%08x(%s)\n",
461 trace(
" ComponentType=%s\n",
465 trace(
" Device=%d (%s) %d.%d (%d:%d)\n",
466 mixerlineA.
Target.dwDeviceID,
467 mixerlineA.
Target.szPname,
468 mixerlineA.
Target.vDriverVersion >> 8,
469 mixerlineA.
Target.vDriverVersion & 0xff,
474 mixerlineA.
cbStruct =
sizeof(mixerlineA);
479 "mixerGetLineInfoA(MIXER_GETLINEINFOF_SOURCE): "
480 "MMSYSERR_NOERROR expected, got %s\n",
483 trace(
" No Driver\n");
488 trace(
" %d: \"%s\" (%s) Destination=%d Source=%d\n",
491 trace(
" LineID=%08x Channels=%d "
492 "Connections=%d Controls=%d\n",
495 trace(
" State=0x%08x(%s)\n",
497 trace(
" ComponentType=%s\n",
501 trace(
" Device=%d (%s) %d.%d (%d:%d)\n",
502 mixerlineA.
Target.dwDeviceID,
503 mixerlineA.
Target.szPname,
504 mixerlineA.
Target.vDriverVersion >> 8,
505 mixerlineA.
Target.vDriverVersion & 0xff,
512 memset(&controls, 0,
sizeof(controls));
516 "mixerGetLineControlsA(MIXER_GETLINECONTROLSF_ALL): "
517 "MMSYSERR_INVALPARAM expected, got %s\n",
522 "mixerGetLineControlsA(-1): "
523 "MMSYSERR_INVALFLAG or MMSYSERR_INVALPARAM expected, got %s\n",
537 "mixerGetLineControlsA(MIXER_GETLINECONTROLSF_ALL): "
538 "MMSYSERR_NOERROR expected, got %s\n",
543 trace(
" %d: \"%s\" (%s) ControlID=%d\n", nc,
544 array[nc].szShortName,
546 trace(
" ControlType=%s\n",
548 trace(
" Control=0x%08x(%s)\n",
549 array[nc].fdwControl,
551 trace(
" Items=%d Min=%d Max=%d Step=%d\n",
552 array[nc].cMultipleItems,
555 array[nc].Metrics.cSteps);
592 "MMSYSERR_NOERROR expected, got %s\n",
608 U(new_details).cMultipleItems = 0;
610 new_details.
cbDetails =
sizeof(new_value);
615 "MMSYSERR_NOERROR expected, got %s\n",
624 U(ret_details).cMultipleItems = 0;
626 ret_details.
cbDetails =
sizeof(ret_value);
631 "MMSYSERR_NOERROR expected, got %s\n",
636 "Couldn't change value from %d to %d, returned %d\n",
650 "MMSYSERR_NOERROR expected, got %s\n",
671 "MMSYSERR_NOERROR expected, got %s\n",
687 U(new_details).cMultipleItems = 0;
689 new_details.
cbDetails =
sizeof(new_value);
694 "MMSYSERR_NOERROR expected, got %s\n",
703 U(ret_details).cMultipleItems = 0;
705 ret_details.
cbDetails =
sizeof(ret_value);
710 "MMSYSERR_NOERROR expected, got %s\n",
715 "Couldn't change value from %d to %d, returned %d\n",
729 "MMSYSERR_NOERROR expected, got %s\n",
752 "mixerGetDevCapsW: MMSYSERR_INVALPARAM expected, got %s\n",
758 "mixerGetDevCapsW: MMSYSERR_NOERROR or MMSYSERR_INVALPARAM expected, got %s\n",
763 "mixerGetDevCapsW: MMSYSERR_NOERROR expected, got %s\n",
769 trace(
" %d: \"%s\" %d.%d (%d:%d) destinations=%d\n",
device,
782 "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",
mmsys_error(rc));
788 "mixerGetDevCapsW: MMSYSERR_NOERROR expected, got %s\n",
798 "mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
799 "MMSYSERR_INVALPARAM expected, got %s\n",
802 mixerlineW.
cbStruct =
sizeof(mixerlineW);
806 "mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
807 "MMSYSERR_INVALPARAM or MIXERR_INVALLINE expected, got %s\n",
810 mixerlineW.
cbStruct =
sizeof(mixerlineW);
814 "mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
815 "MMSYSERR_INVALPARAM expected, got %s\n",
818 mixerlineW.
cbStruct =
sizeof(mixerlineW);
822 "mixerGetLineInfoW(-1): MMSYSERR_INVALFLAG expected, got %s\n",
825 mixerlineW.
cbStruct =
sizeof(mixerlineW);
830 "mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
831 "MMSYSERR_NOERROR expected, got %s\n",
833 ok(mixerlineW.
dwUser == 0,
"dwUser was not reset\n");
835 trace(
" No Driver\n");
846 trace(
" %d: \"%s\" (%s) Destination=%d Source=%d\n",
849 trace(
" LineID=%08x Channels=%d "
850 "Connections=%d Controls=%d\n",
853 trace(
" State=0x%08x(%s)\n",
855 trace(
" ComponentType=%s\n",
859 trace(
" Device=%d (%s) %d.%d (%d:%d)\n",
860 mixerlineW.
Target.dwDeviceID,szPname,
861 mixerlineW.
Target.vDriverVersion >> 8,
862 mixerlineW.
Target.vDriverVersion & 0xff,
867 mixerlineW.
cbStruct =
sizeof(mixerlineW);
872 "mixerGetLineInfoW(MIXER_GETLINEINFOF_SOURCE): "
873 "MMSYSERR_NOERROR expected, got %s\n",
876 trace(
" No Driver\n");
890 trace(
" %d: \"%s\" (%s) Destination=%d Source=%d\n",
893 trace(
" LineID=%08x Channels=%d "
894 "Connections=%d Controls=%d\n",
897 trace(
" State=0x%08x(%s)\n",
899 trace(
" ComponentType=%s\n",
903 trace(
" Device=%d (%s) %d.%d (%d:%d)\n",
904 mixerlineW.
Target.dwDeviceID,szPname,
905 mixerlineW.
Target.vDriverVersion >> 8,
906 mixerlineW.
Target.vDriverVersion & 0xff,
915 "mixerGetLineControlsW(MIXER_GETLINECONTROLSF_ALL): "
916 "MMSYSERR_INVALPARAM expected, got %s\n",
920 "mixerGetLineControlsW(-1): "
921 "MMSYSERR_INVALFLAG or MMSYSERR_INVALPARAM expected, got %s\n",
935 "mixerGetLineControlsW(MIXER_GETLINECONTROLSF_ALL): "
936 "MMSYSERR_NOERROR expected, got %s\n",
947 trace(
" %d: \"%s\" (%s) ControlID=%d\n", nc,
949 trace(
" ControlType=%s\n",
951 trace(
" Control=0x%08x(%s)\n",
952 array[nc].fdwControl,
954 trace(
" Items=%d Min=%d Max=%d Step=%d\n",
955 array[nc].cMultipleItems,
958 array[nc].Metrics.cSteps);
980 trace(
"--- Testing ASCII functions ---\n");
983 trace(
"found %d Mixer devices\n",ndev);
987 "mixerGetDevCapsA: MMSYSERR_BADDEVICEID expected, got %s\n",
1000 trace(
"--- Testing WCHAR functions ---\n");
1003 trace(
"found %d Mixer devices\n",ndev);
1007 "mixerGetDevCapsW: MMSYSERR_BADDEVICEID or MMSYSERR_NOTSUPPORTED "
1012 for (
d=0;
d<ndev;
d++)
1028 "mixerOpen: MMSYSERR_BADDEVICEID expected, got %s\n",
1034 "mixerOpen: MMSYSERR_BADDEVICEID or MMSYSERR_INVALHANDLE expected, got %s\n",
1037 for (
d = 0;
d < ndev;
d++) {
1042 "mixerOpen: MMSYSERR_INVALFLAG expected, got %s\n",
1048 "mixerOpen: MMSYSERR_INVALPARAM expected, got %s\n",
1056 "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",
1064 "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",
1072 "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",
1084 "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",
1092 "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
#define MIXERCONTROL_CONTROLF_DISABLED
#define MIXERCONTROL_CONTROLTYPE_EQUALIZER
#define MIXERLINE_COMPONENTTYPE_DST_TELEPHONE
#define MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED
#define MIXERLINE_LINEF_DISCONNECTED
struct tagMIXERLINECONTROLSW MIXERLINECONTROLSW
#define MIXERLINE_COMPONENTTYPE_DST_LINE
#define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS
#define MIXERLINE_COMPONENTTYPE_SRC_DIGITAL
#define MIXERCONTROL_CONTROLTYPE_BOOLEAN
#define MIXERCONTROL_CONTROLTYPE_DECIBELS
#define MIXERLINE_TARGETTYPE_WAVEOUT
#define MIXERCONTROL_CONTROLF_UNIFORM
#define MMSYSERR_NOTSUPPORTED
#define MIXERLINE_COMPONENTTYPE_DST_DIGITAL
#define MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT
#define MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE
#define MIXERCONTROL_CONTROLTYPE_ONOFF
#define MIXERCONTROL_CONTROLTYPE_STEREOENH
#define MIXERLINE_TARGETTYPE_MIDIOUT
#define MIXER_SETCONTROLDETAILSF_VALUE
#define MIXERLINE_COMPONENTTYPE_DST_HEADPHONES
#define MIXERLINE_COMPONENTTYPE_DST_UNDEFINED
#define MIXERLINE_COMPONENTTYPE_SRC_ANALOG
#define MIXER_GETCONTROLDETAILSF_VALUE
#define MIXERCONTROL_CONTROLTYPE_MUX
#define MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER
#define MIXERLINE_COMPONENTTYPE_DST_MONITOR
#define MMSYSERR_NODRIVER
#define MIXERCONTROL_CONTROLTYPE_LOUDNESS
#define MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT
#define MIXERLINE_TARGETTYPE_WAVEIN
#define MIXER_GETLINEINFOF_DESTINATION
#define MIXERCONTROL_CONTROLTYPE_BUTTON
#define MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY
#define MIXERLINE_TARGETTYPE_MIDIIN
struct tagMIXERCONTROLW MIXERCONTROLW
#define MIXERCONTROL_CONTROLF_MULTIPLE
#define MIXERLINE_COMPONENTTYPE_SRC_LINE
#define MIXERCONTROL_CONTROLTYPE_FADER
#define MIXERCONTROL_CONTROLTYPE_VOLUME
#define MIXERCONTROL_CONTROLTYPE_TREBLE
#define MIXERCONTROL_CONTROLTYPE_MILLITIME
#define MIXER_LONG_NAME_CHARS
#define MIXERCONTROL_CONTROLTYPE_MICROTIME
#define MIXERCONTROL_CONTROLTYPE_UNSIGNED
#define MIXERCONTROL_CONTROLTYPE_QSOUNDPAN
#define MMSYSERR_INVALHANDLE
#define MIXERLINE_COMPONENTTYPE_DST_WAVEIN
#define MIXERCONTROL_CONTROLTYPE_BASS_BOOST
#define MIXERCONTROL_CONTROLTYPE_SINGLESELECT
#define MIXERLINE_TARGETTYPE_AUX
#define MIXER_GETLINEINFOF_SOURCE
#define MIXER_GETLINECONTROLSF_ALL
#define MIXERCONTROL_CONTROLTYPE_SIGNEDMETER
#define MMSYSERR_INVALPARAM
#define MIXERCONTROL_CONTROLTYPE_PERCENT
#define MIXERCONTROL_CONTROLTYPE_MIXER
#define MIXERCONTROL_CONTROLTYPE_PEAKMETER
struct tMIXERCONTROLDETAILS MIXERCONTROLDETAILS
#define MIXERLINE_LINEF_ACTIVE
#define MMSYSERR_INVALFLAG
#define MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER
#define MIXERCONTROL_CONTROLTYPE_SLIDER
#define CALLBACK_FUNCTION
#define MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE
#define MIXER_SHORT_NAME_CHARS
#define MIXERCONTROL_CONTROLTYPE_PAN
#define MIXERCONTROL_CONTROLTYPE_MONO
#define MIXERLINE_COMPONENTTYPE_DST_VOICEIN
#define MMSYSERR_BADDEVICEID
struct tagMIXERLINECONTROLSA MIXERLINECONTROLSA
#define MIXERCONTROL_CONTROLTYPE_SIGNED
#define MIXERLINE_TARGETTYPE_UNDEFINED
struct tagMIXERCONTROLA MIXERCONTROLA
#define MIXERCONTROL_CONTROLTYPE_BOOLEANMETER
#define MIXERCONTROL_CONTROLTYPE_MUTE
#define MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC
#define MIXERCONTROL_CONTROLTYPE_CUSTOM
#define MIXERCONTROL_CONTROLTYPE_BASS
#define MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER
#define MIXERLINE_LINEF_SOURCE
const char * mmsys_error(MMRESULT error)
static void test_mixerClose(HMIXER mix)
static void mixer_testsW(void)
static void mixer_test_controlW(HMIXEROBJ mix, MIXERCONTROLW *control)
static const char * control_flags(DWORD fdwControl)
static void mixer_testsA(void)
static void mixer_test_deviceA(int device)
static const char * component_type(DWORD dwComponentType)
static const char * target_type(DWORD dwType)
static void mixer_test_controlA(HMIXEROBJ mix, MIXERCONTROLA *control)
static void mixer_test_deviceW(int device)
static const char * control_type(DWORD dwControlType)
static const char * line_flags(DWORD fdwLine)
static void test_mixerOpen(void)
unsigned __int3264 UINT_PTR
static const WCHAR szName[]
CHAR szPname[MAXPNAMELEN]
WCHAR szPname[MAXPNAMELEN]
CHAR szShortName[MIXER_SHORT_NAME_CHARS]
struct tagMIXERLINEA::@3035 Target
CHAR szName[MIXER_LONG_NAME_CHARS]
struct tagMIXERLINEW::@3036 Target
WCHAR szName[MIXER_LONG_NAME_CHARS]
WCHAR szShortName[MIXER_SHORT_NAME_CHARS]
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL _In_ MIX mix
UINT WINAPI mixerGetLineControlsW(HMIXEROBJ hmix, LPMIXERLINECONTROLSW lpmlcW, DWORD fdwControls)
UINT WINAPI mixerClose(HMIXER hMix)
UINT WINAPI mixerGetLineControlsA(HMIXEROBJ hmix, LPMIXERLINECONTROLSA lpmlcA, DWORD fdwControls)
UINT WINAPI mixerGetDevCapsW(UINT_PTR uDeviceID, LPMIXERCAPSW lpCaps, UINT uSize)
UINT WINAPI mixerGetControlDetailsW(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdW, DWORD fdwDetails)
UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW, DWORD fdwInfo)
UINT WINAPI mixerGetNumDevs(void)
UINT WINAPI mixerGetDevCapsA(UINT_PTR uDeviceID, LPMIXERCAPSA lpCaps, UINT uSize)
UINT WINAPI mixerOpen(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
UINT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA, DWORD fdwDetails)
UINT WINAPI mixerGetLineInfoA(HMIXEROBJ hmix, LPMIXERLINEA lpmliA, DWORD fdwInfo)
UINT WINAPI mixerSetControlDetails(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcd, DWORD fdwDetails)