version 1.14, 2015/11/25 18:47:12 |
version 1.15, 2016/01/08 16:17:31 |
|
|
} |
} |
|
|
/* |
/* |
* in the worst case output message is twice the |
* in the worst case output message is twice the |
* input message (2-byte messages with running status) |
* input message (2-byte messages with running status) |
*/ |
*/ |
tickets = maxavail / 2 - iep->tickets; |
tickets = maxavail / 2 - iep->tickets; |
|
|
* store the given message in the output buffer |
* store the given message in the output buffer |
*/ |
*/ |
void |
void |
midi_out(struct midi *oep, unsigned char *idata, int icount) |
midi_out(struct midi *oep, unsigned char *idata, int icount) |
{ |
{ |
unsigned char *odata; |
unsigned char *odata; |
int ocount; |
int ocount; |
#ifdef DEBUG |
#ifdef DEBUG |
int i; |
int i; |
#endif |
#endif |
|
|
while (icount > 0) { |
while (icount > 0) { |
if (oep->obuf.used == oep->obuf.len) { |
if (oep->obuf.used == oep->obuf.len) { |
#ifdef DEBUG |
#ifdef DEBUG |
|
|
panic(); |
panic(); |
} |
} |
#endif |
#endif |
c->state = PORT_CFG; |
c->state = PORT_CFG; |
port_mio_close(c); |
port_mio_close(c); |
|
|
for (i = 0; i < MIDI_NEP; i++) { |
for (i = 0; i < MIDI_NEP; i++) { |
ep = midi_ep + i; |
ep = midi_ep + i; |
if ((ep->txmask & c->midi->self) || |
if ((ep->txmask & c->midi->self) || |