diff options
author | waker <wakeroid@gmail.com> | 2011-07-03 12:14:35 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-07-03 12:14:35 +0200 |
commit | f8934177441a508548a0891e94ab78f5f1e433fd (patch) | |
tree | 9ccc97750272f9a4fe5bd23310c694144a0a1944 /plugins | |
parent | 9245c4001ff209a4eab990ac2f590972656fddf9 (diff) |
fixed int32 overflow when calculating sleep time in alsa loop
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/alsa/alsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } } |