Revision b4f763b8

b/audio/alsaaudio.c
37 37
    snd_pcm_t *handle;
38 38
    struct pollfd *pfds;
39 39
    int count;
40
    int mask;
40 41
};
41 42

  
42 43
typedef struct ALSAVoiceOut {
......
200 201
        return;
201 202
    }
202 203

  
203
    if (!(revents & POLLOUT)) {
204
    if (!(revents & hlp->mask)) {
204 205
        if (conf.verbose) {
205 206
            dolog ("revents = %d\n", revents);
206 207
        }
......
230 231
    }
231 232
}
232 233

  
233
static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp)
234
static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask)
234 235
{
235 236
    int i, count, err;
236 237
    struct pollfd *pfds;
......
287 288
    hlp->pfds = pfds;
288 289
    hlp->count = count;
289 290
    hlp->handle = handle;
291
    hlp->mask = mask;
290 292
    return 0;
291 293
}
292 294

  
......
294 296
{
295 297
    ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
296 298

  
297
    return alsa_poll_helper (alsa->handle, &alsa->pollhlp);
299
    return alsa_poll_helper (alsa->handle, &alsa->pollhlp, POLLOUT);
298 300
}
299 301

  
300 302
static int alsa_poll_in (HWVoiceIn *hw)
301 303
{
302 304
    ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
303 305

  
304
    return alsa_poll_helper (alsa->handle, &alsa->pollhlp);
306
    return alsa_poll_helper (alsa->handle, &alsa->pollhlp, POLLIN);
305 307
}
306 308

  
307 309
static int alsa_write (SWVoiceOut *sw, void *buf, int len)

Also available in: Unified diff