Jörg Höhle : midimap: Allow GetVolume by device identifier.
Alexandre Julliard
julliard at winehq.org
Fri Mar 19 11:16:39 CDT 2010
Module: wine
Branch: master
Commit: 104cc7c28e8cf7d75596f0c55ef056b6278fa6e2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=104cc7c28e8cf7d75596f0c55ef056b6278fa6e2
Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date: Sat Feb 20 12:54:48 2010 +0100
midimap: Allow GetVolume by device identifier.
---
dlls/midimap/midimap.c | 1 -
dlls/winmm/tests/midi.c | 5 +++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/midimap/midimap.c b/dlls/midimap/midimap.c
index 833c2f7..0c54d45 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 7ce402d..e531d04 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
More information about the wine-cvs
mailing list