Commit 104cc7c2 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

midimap: Allow GetVolume by device identifier.

parent fb8812db
...@@ -446,7 +446,6 @@ static DWORD modUnprepare(MIDIMAPDATA* mom, LPMIDIHDR lpMidiHdr, DWORD_PTR dwPar ...@@ -446,7 +446,6 @@ static DWORD modUnprepare(MIDIMAPDATA* mom, LPMIDIHDR lpMidiHdr, DWORD_PTR dwPar
static DWORD modGetVolume(MIDIMAPDATA* mom, DWORD* lpdwVolume) static DWORD modGetVolume(MIDIMAPDATA* mom, DWORD* lpdwVolume)
{ {
if (MIDIMAP_IsBadData(mom)) return MMSYSERR_ERROR;
if (!lpdwVolume) return MMSYSERR_INVALPARAM; if (!lpdwVolume) return MMSYSERR_INVALPARAM;
*lpdwVolume = 0xFFFFFFFF; /* tests show this initial value */ *lpdwVolume = 0xFFFFFFFF; /* tests show this initial value */
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
......
...@@ -230,6 +230,11 @@ static void test_midiOut_device(UINT udev, HWND hwnd) ...@@ -230,6 +230,11 @@ static void test_midiOut_device(UINT udev, HWND hwnd)
* real devices with the volume GUI SW-synth settings. */ * real devices with the volume GUI SW-synth settings. */
if (!rc) trace("Current volume %x on device %d\n", ovolume, udev); 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 /* Tests with midiOutSetvolume show that the midi mapper forwards
* the value to the real device, but Get initially always reports * the value to the real device, but Get initially always reports
* FFFFFFFF. Therefore, a Get+SetVolume pair with the mapper is * FFFFFFFF. Therefore, a Get+SetVolume pair with the mapper is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment