From f8934177441a508548a0891e94ab78f5f1e433fd Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 3 Jul 2011 12:14:35 +0200 Subject: fixed int32 overflow when calculating sleep time in alsa loop --- plugins/alsa/alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/alsa') diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c index fd71c89a..0cc458db 100644 --- a/plugins/alsa/alsa.c +++ b/plugins/alsa/alsa.c @@ -672,7 +672,7 @@ palsa_thread (void *context) { UNLOCK; int sleeptime = period_size-frames_to_deliver; if (sleeptime > 0 && plugin.fmt.samplerate > 0 && plugin.fmt.channels > 0) { - usleep (sleeptime * 1000000 / plugin.fmt.samplerate / plugin.fmt.channels); + usleep (sleeptime * 1000 / plugin.fmt.samplerate / plugin.fmt.channels * 1000); } } } -- cgit v1.2.3