Akihiro Sagawa : winealsa: Use the symbolic name for MIDI_CTL_ALL_SOUNDS_OFF.

Alexandre Julliard julliard at winehq.org
Thu May 26 15:46:27 CDT 2022


Module: wine
Branch: master
Commit: 0bd43e778536557be3d79d1f5d6787d072e1b306
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0bd43e778536557be3d79d1f5d6787d072e1b306

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Thu May 26 23:38:45 2022 +0900

winealsa: Use the symbolic name for MIDI_CTL_ALL_SOUNDS_OFF.

MIDI_CTL_ALL_SOUNDS_OFF is channel dependent.

Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winealsa.drv/alsamidi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/dlls/winealsa.drv/alsamidi.c b/dlls/winealsa.drv/alsamidi.c
index 12a469533d9..ccb9146ed2b 100644
--- a/dlls/winealsa.drv/alsamidi.c
+++ b/dlls/winealsa.drv/alsamidi.c
@@ -922,13 +922,10 @@ static UINT midi_out_reset(WORD dev_id)
     if (!dests[dev_id].bEnabled) return MIDIERR_NODEVICE;
 
     /* stop all notes */
-    /* FIXME: check if 0x78B0 is channel dependent or not. I coded it so that
-     * it's channel dependent...
-     */
     for (chn = 0; chn < 16; chn++)
     {
         /* turn off every note */
-        midi_out_data(dev_id, 0x7800 | MIDI_CMD_CONTROL | chn);
+        midi_out_data(dev_id, (MIDI_CTL_ALL_SOUNDS_OFF << 8) | MIDI_CMD_CONTROL | chn);
         /* remove sustain on all channels */
         midi_out_data(dev_id, (MIDI_CTL_SUSTAIN << 8) | MIDI_CMD_CONTROL | chn);
     }




More information about the wine-cvs mailing list