From 104cc7c28e8cf7d75596f0c55ef056b6278fa6e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Sat, 20 Feb 2010 12:54:48 +0100 Subject: [PATCH] midimap: Allow GetVolume by device identifier. --- dlls/midimap/midimap.c | 1 - dlls/winmm/tests/midi.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/midimap/midimap.c b/dlls/midimap/midimap.c index 833c2f75f71..0c54d457d54 100644 --- a/dlls/midimap/midimap.c +++ b/dlls/midimap/midimap.c @@ -446,7 +446,6 @@ static DWORD modUnprepare(MIDIMAPDATA* mom, LPMIDIHDR lpMidiHdr, DWORD_PTR dwPar static DWORD modGetVolume(MIDIMAPDATA* mom, DWORD* lpdwVolume) { - if (MIDIMAP_IsBadData(mom)) return MMSYSERR_ERROR; if (!lpdwVolume) return MMSYSERR_INVALPARAM; *lpdwVolume = 0xFFFFFFFF; /* tests show this initial value */ return MMSYSERR_NOERROR; diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c index 7ce402db5b5..e531d04e0a2 100644 --- a/dlls/winmm/tests/midi.c +++ b/dlls/winmm/tests/midi.c @@ -230,6 +230,11 @@ static void test_midiOut_device(UINT udev, HWND hwnd) * real devices with the volume GUI SW-synth settings. */ if (!rc) trace("Current volume %x on device %d\n", ovolume, udev); + /* The W95 ESFM Synthesis device reports NOTENABLED although + * GetVolume by handle works and music plays. */ + rc = midiOutGetVolume((HMIDIOUT)udev, &ovolume); + ok((capsA.dwSupport & MIDICAPS_VOLUME) ? rc==MMSYSERR_NOERROR || broken(rc==MMSYSERR_NOTENABLED) : rc==MMSYSERR_NOTSUPPORTED, "midiOutGetVolume(dev=%d) rc=%s\n", udev, mmsys_error(rc)); + /* Tests with midiOutSetvolume show that the midi mapper forwards * the value to the real device, but Get initially always reports * FFFFFFFF. Therefore, a Get+SetVolume pair with the mapper is -- 2.11.4.GIT