From alsa-devel-owner@alsa.jcu.cz  Wed Feb 17 13:14:13 1999
Received: from post.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id NAA25176
	for <alsa-devel@alsa.jcu.cz>; Wed, 17 Feb 1999 13:12:25 +0100
Received: from [212.228.182.246] (helo=ariel.sr.home)
	by post.mail.demon.net with esmtp (Exim 2.12 #1)
	id 10D5r4-0000QV-00
	for alsa-devel@alsa.jcu.cz; Wed, 17 Feb 1999 12:13:26 +0000
Received: (from steve@localhost)
	by ariel.sr.home (8.8.7/8.8.7) id MAA18335
	for alsa-devel@alsa.jcu.cz; Wed, 17 Feb 1999 12:08:00 GMT
Date: Wed, 17 Feb 1999 12:08:00 GMT
From: Steve Ratcliffe <steve@parabola.demon.co.uk>
Message-Id: <199902171208.MAA18335@ariel.sr.home>
To: alsa-devel@alsa.jcu.cz
Subject: Widi
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list


Hi,

I downloaded Widi by Yamahata Isaku from
http://www.kusm.kyoto-u.ac.jp/%7Eyamahata/widi/ to try with the AWE midi
Synth client.

And it works, excellent! A real app to use.

For my card I needed to set the following environment variables:

	export WIDI_SEQUENCER_ALSA_DEST_QUEUE_A=1
	export WIDI_SEQUENCER_ALSA_DEST_CLIENT_A=65
	export WIDI_SEQUENCER_ALSA_DEST_PORT_A=0
	export WIDI_SEQUENCER_ALSA_DEST_QUEUE_B=1
	export WIDI_SEQUENCER_ALSA_DEST_CLIENT_B=65
	export WIDI_SEQUENCER_ALSA_DEST_PORT_B=1

You can even run another one against ports 2 and 3 at the same time
if you should want to.

I also made the appended patch to Widi. (against widi-19990204-SNAP)

..Steve

--
--- ./src/Sequencer/ALSA/SequencerALSA.cc.orig	Wed Feb 17 11:20:31 1999
+++ ./src/Sequencer/ALSA/SequencerALSA.cc	Wed Feb 17 11:50:30 1999
@@ -205,7 +205,7 @@
 	   << snd_strerror (ret) << endl;
       return;
     }
-  if ((portInfo.capability & SND_SEQ_PORT_CAP_OUT) == 0)
+  if ((portInfo.capability & SND_SEQ_PORT_CAP_IN) == 0)
     {
       cerr << "SequencerALSA::initializePort getPortInfo cliet="
 	   << destClient << ":port=" << destPort
--- ./src/Sequencer/ALSA/AlsaClient.cc.orig	Wed Feb 17 11:34:44 1999
+++ ./src/Sequencer/ALSA/AlsaClient.cc	Wed Feb 17 11:50:24 1999
@@ -1099,7 +1099,7 @@
 
 int AlsaClient::drainInput ()
 {
-  return snd_seq_drain_output (handle);
+  return snd_seq_drain_input (handle);
 }
 
 
@@ -1121,7 +1121,9 @@
 {
   //send echo event to myself.
   //DEBUG_MESSAGE ("AlsaClient::sync sending echo event");
-  echoEvent (real, srcPort, destQueue, getClientId (), destPort, 0);
+  // destPort should be myPort to go with getClientId(). ..sr
+  echoEvent (real, srcPort, destQueue, getClientId (), 0/*XXX*/, 0);
+  //echoEvent (real, srcPort, destQueue, getClientId (), destPort, 0);
   //DEBUG_MESSAGE ("AlsaClient::sync flushing");
   //flushing the buffer
   int left = snd_seq_flush_output (handle);
@@ -1144,7 +1146,7 @@
       assert ((event->flags & SND_SEQ_TIME_STAMP_REAL) != 0);
       assert (event->dest.client == getClientId ());
       assert (event->dest.queue == destQueue);
-      assert (event->dest.port == destPort);
+      // myPort: assert (event->dest.port == destPort);
       assert (event->dest.channel == 0);
       if (compareTime (event->time.real, real) >= 0)
 	{

