Andrew Eikum : winealsa.drv: Clean up midiOpenSeq.

Alexandre Julliard julliard at winehq.org
Wed Feb 12 16:21:09 CST 2020


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

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Wed Feb 12 12:52:53 2020 -0600

winealsa.drv: Clean up midiOpenSeq.

Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winealsa.drv/midi.c | 35 ++++++++++++++---------------------
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index 58b10bf666..7be7bc58f3 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -243,33 +243,26 @@ static int midiOpenSeq(BOOL create_client)
 	    return -1;
 	}
 
-	if (create_client) {
-	    /* Setting the client name is the only init to do */
-	    snd_seq_set_client_name(midiSeq, "WINE midi driver");
+        if (create_client) {
+            /* Setting the client name is the only init to do */
+            snd_seq_set_client_name(midiSeq, "WINE midi driver");
 
-#if 0 /* FIXME: Is it possible to use a port for READ & WRITE ops */
-            port_in = port_out = snd_seq_create_simple_port(midiSeq, "WINE ALSA Input/Output", SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_WRITE,
-	             	                                                 SND_SEQ_PORT_TYPE_APPLICATION);
+            port_out = snd_seq_create_simple_port(midiSeq, "WINE ALSA Output",
+                    SND_SEQ_PORT_CAP_READ,
+                    SND_SEQ_PORT_TYPE_APPLICATION);
             if (port_out < 0)
-               TRACE("Unable to create output port\n");
+                TRACE("Unable to create output port\n");
             else
-	       TRACE("Outport port %d created successfully\n", port_out);
-#else
-            port_out = snd_seq_create_simple_port(midiSeq, "WINE ALSA Output", SND_SEQ_PORT_CAP_READ,
-	                 	                                                 SND_SEQ_PORT_TYPE_APPLICATION);
-	    if (port_out < 0)
-		TRACE("Unable to create output port\n");
-	    else
-		TRACE("Outport port %d created successfully\n", port_out);
-
-	    port_in = snd_seq_create_simple_port(midiSeq, "WINE ALSA Input", SND_SEQ_PORT_CAP_WRITE,
-	             	                                               SND_SEQ_PORT_TYPE_APPLICATION);
+                TRACE("Outport port %d created successfully\n", port_out);
+
+            port_in = snd_seq_create_simple_port(midiSeq, "WINE ALSA Input",
+                    SND_SEQ_PORT_CAP_WRITE,
+                    SND_SEQ_PORT_TYPE_APPLICATION);
             if (port_in < 0)
                 TRACE("Unable to create input port\n");
             else
-	        TRACE("Input port %d created successfully\n", port_in);
-#endif
-       }
+                TRACE("Input port %d created successfully\n", port_in);
+        }
     }
     numOpenMidiSeq++;
     LeaveCriticalSection(&midiSeqLock);




More information about the wine-cvs mailing list