diff options
author | Abramo Bagnara <abramo@alsa-project.org> | 2001-02-12 23:51:53 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo@alsa-project.org> | 2001-02-12 23:51:53 +0000 |
commit | 0b017222660bc0473e76cea990a2266c3e03d0c1 (patch) | |
tree | c9b700359b826459471f298e8fa7ed2bbbe8ec39 /seq | |
parent | abd8b9f9e89f81583472bb0e649257ec13de839d (diff) |
More generic support for poll descriptors
Diffstat (limited to 'seq')
-rw-r--r-- | seq/aseqnet/aseqnet.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/seq/aseqnet/aseqnet.c b/seq/aseqnet/aseqnet.c index f4a4b4b..061946a 100644 --- a/seq/aseqnet/aseqnet.c +++ b/seq/aseqnet/aseqnet.c @@ -232,12 +232,17 @@ static void close_files(void) static void init_seq(char *source, char *dest) { snd_seq_addr_t addr; + int err; + struct pollfd pfd; if (snd_seq_open(&handle, "hw", SND_SEQ_OPEN_DUPLEX, 0) < 0) { perror("snd_seq_open"); exit(1); } - seqfd = snd_seq_poll_descriptor(handle); + err = snd_seq_poll_descriptors(handle, &pfd, 1); + assert(err == 1); + seqfd = pfd.fd; + snd_seq_nonblock(handle, 0); /* set client info */ |