Seems like it ought to be working

This commit is contained in:
Neale Pickett 2013-09-08 18:03:26 -06:00
parent d95064cf87
commit bc38826f46
1 changed files with 15 additions and 3 deletions

18
alsa.c
View File

@ -116,12 +116,24 @@ alsa_write(uint8_t *data, size_t datalen)
fprintf(stderr, "ALSA didn't parse that message\n"); fprintf(stderr, "ALSA didn't parse that message\n");
abort(); abort();
} }
snd_seq_ev_set_direct(&ev);
snd_seq_ev_set_source(&ev, seq_port);
snd_seq_ev_set_subs(&ev);
if ((r = snd_seq_event_output(snd_handle, &ev)) < 0) { if ((r = snd_seq_event_output(snd_handle, &ev)) < 0) {
fprintf(stderr, "ALSA couldn't write an event: %ld\n", r); fprintf(stderr, "ALSA couldn't write an event: %ld\n", r);
abort(); abort();
} }
snd_seq_drain_output(snd_handle); snd_seq_drain_output(snd_handle);
DUMP();
{
int i;
printf("A> ");
for (i = 0; i < datalen; i += 1) {
printf("%02x ", data[i]);
}
printf("\n");
}
} }