From db5462372c22d04a44f2264262a9517f6ef8f1c8 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 22 Aug 2010 21:18:48 +0200 Subject: [PATCH] Shouldn't write in non-blocking, if it blocks. --- rsound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsound.c b/rsound.c index e37b62594b..181f0859c8 100644 --- a/rsound.c +++ b/rsound.c @@ -75,7 +75,7 @@ static ssize_t __rsd_write(void* data, const void* buf, size_t size) { rsd_t *rsd = data; - if ( rsd_delay_ms(rsd->rd) > rsd->latency && rsd->nonblock ) + if ( (rsd_delay_ms(rsd->rd) > rsd->latency || rsd_get_avail(rsd->rd) < size) && rsd->nonblock ) return 0; if ( size == 0 )