]> git.pld-linux.org Git - packages/TiMidity++.git/blob - TiMidity++-stop_polling.patch
- versioned timidity* Obsoletes, dropped bogus TiMidity++ Obsoletes
[packages/TiMidity++.git] / TiMidity++-stop_polling.patch
1 --- TiMidity++-2.13.2/interface/alsaseq_c.c.orig        2010-12-16 13:26:54.000000000 +0100
2 +++ TiMidity++-2.13.2/interface/alsaseq_c.c     2010-12-16 14:15:24.486618509 +0100
3 @@ -505,6 +505,8 @@
4  
5  static void doit(struct seq_context *ctxp)
6  {
7 +       fd_set rfds;
8 +       struct timeval timeout;
9         for (;;) {
10                 while (snd_seq_event_input_pending(ctxp->handle, 1)) {
11                         if (do_sequencer(ctxp))
12 @@ -532,15 +534,17 @@
13                         play_event(&ev);
14                         aq_fill_nonblocking();
15                 }
16 -               if (! ctxp->active || ! IS_STREAM_TRACE) {
17 -                       fd_set rfds;
18 -                       struct timeval timeout;
19 -                       FD_ZERO(&rfds);
20 -                       FD_SET(ctxp->fd, &rfds);
21 +               
22 +               FD_ZERO(&rfds);
23 +               FD_SET(ctxp->fd, &rfds);
24 +               if (ctxp->active) {
25                         timeout.tv_sec = 0;
26                         timeout.tv_usec = 10000; /* 10ms */
27                         if (select(ctxp->fd + 1, &rfds, NULL, NULL, &timeout) < 0)
28                                 goto __done;
29 +               } else {
30 +                       if (select(ctxp->fd + 1, &rfds, NULL, NULL, NULL) < 0)
31 +                               goto __done;
32                 }
33         }
34  
This page took 0.065092 seconds and 3 git commands to generate.