miltiple midi input ports

Tom Schouten tom at zzz.kotnet.org
Thu Jan 11 09:00:57 CET 2001



On Thu, 11 Jan 2001, Tom Schouten wrote:

> 
> hi,
> 
> i have the following problem:
> when i use multiple midi-in ports, the midiin object only receives
> messages from the first port. output works fine to the other ports
> though..
> 
> i found this line in s_linux_midi_io.c in function 
> int midi_instat(MIDIPort *mp)   
> 
> FD_SET(mproot->devhandle,&midi_rfds);
> 
> which i thought was the problem, since mproot is the first port and the
> function doesnt use the *mp argument supplied, so i changed it to 
> 
> FD_SET(mp->devhandle,&midi_rfds);
>

of course, the next line has to be corrected too, so

  FD_SET(mproot->devhandle,&midi_rfds);
  return select(mproot->devhandle+1,&midi_rfds,NULL,NULL,&null_tv);

becomes

  FD_SET(mp->devhandle,&midi_rfds);
  return select(mp->devhandle+1,&midi_rfds,NULL,NULL,&null_tv);

and then it works fine!


tom




More information about the Pd-list mailing list