X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=oss_write.c;h=75ad98b9faac0acfa912628c6bafed31d085b90b;hb=181beb316afad036ac01a778544c5dec0a8d51c7;hp=311a514dc86ff6bfb01abf53d16a75672827af12;hpb=82a2ba5f555f69f5a6f14fd4a7f7eef8fd1f1fd9;p=paraslash.git diff --git a/oss_write.c b/oss_write.c index 311a514d..75ad98b9 100644 --- a/oss_write.c +++ b/oss_write.c @@ -199,9 +199,15 @@ static int oss_post_select(__a_unused struct sched *s, void *context) if (sound_device_is_busy()) return 0; - get_btr_sample_rate(btrn, &rate); - get_btr_channels(btrn, &ch); - get_btr_sample_format(btrn, &format); + ret = get_btr_sample_rate(btrn, &rate); + if (ret < 0) + goto out; + ret = get_btr_channels(btrn, &ch); + if (ret < 0) + goto out; + ret = get_btr_sample_format(btrn, &format); + if (ret < 0) + goto out; ret = oss_init(wn, rate, ch, format); if (ret < 0) goto out; @@ -216,7 +222,7 @@ static int oss_post_select(__a_unused struct sched *s, void *context) goto out; } ret = 0; - if (!FD_ISSET(powd->fd, &s->wfds)) + if (!sched_write_ok(powd->fd, s)) goto out; /* get maximal number of bytes that can be written */ ret = ioctl(powd->fd, SNDCTL_DSP_GETOSPACE, &abi);