I have simplified the seq.c in the alsa-driver-test direcory for me
to also understand.
The program is now quite short and outputs a note and quits
here is it
-----------
#include <stdio.h>
#include "alsa/asoundlib.h"
int main(int argc, char *argv[])
{
snd_seq_t *handle;
snd_seq_event_t ev;
snd_seq_open(&handle, "hw", SND_SEQ_OPEN_DUPLEX, 0);
snd_seq_alloc_queue(handle);
bzero(&ev, sizeof(ev));
ev.dest.client=65;
ev.dest.port=0;
ev.type = SND_SEQ_EVENT_NOTEON;
ev.data.note.channel = 0;
ev.data.note.note = 64 ;
ev.data.note.velocity = 127;
snd_seq_event_output_direct(handle, &ev);
sleep(1);
ev.type = SND_SEQ_EVENT_NOTEOFF;
snd_seq_event_output_direct(handle, &ev);
snd_seq_drain_output(handle);
return 0;
}
There are two questions ?
Why doesn't it work if I allocate no queue ? There is no need for a queue as i
directly output events
What does "hw" mean ? what are the other possibilities ?
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel