[BACK]Return to midi.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sndiod

Diff for /src/usr.bin/sndiod/midi.c between version 1.16 and 1.17

version 1.16, 2017/01/03 06:53:20 version 1.17, 2019/03/28 11:18:56
Line 238 
Line 238 
         int i, tickets, avail, maxavail;          int i, tickets, avail, maxavail;
         struct midi *oep;          struct midi *oep;
   
           /*
            * don't request iep->ops->fill() too often as it generates
            * useless network traffic: wait until we reach half of the
            * max tickets count. As in the worst case (see comment below)
            * one ticket may consume two bytes, the max ticket count is
            * BUFSZ / 2 and halt of it is simply BUFSZ / 4.
            */
           if (iep->tickets >= MIDI_BUFSZ / 4)
                   return;
   
         maxavail = MIDI_BUFSZ;          maxavail = MIDI_BUFSZ;
         for (i = 0; i < MIDI_NEP ; i++) {          for (i = 0; i < MIDI_NEP ; i++) {
                 if ((iep->txmask & (1 << i)) == 0)                  if ((iep->txmask & (1 << i)) == 0)

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17