From d8013df97d768878472acca26cc67c58b2b33b4f Mon Sep 17 00:00:00 2001 From: FRIGN Date: Sun, 5 Oct 2014 20:08:55 +0200 Subject: Fix units (us -> ms) Got off a factor of a thousand, this would've never worked. Now it should handle the calls properly. --- ratox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ratox.c b/ratox.c index e2010da..b57b2a0 100644 --- a/ratox.c +++ b/ratox.c @@ -600,8 +600,8 @@ sendfriendcalldata(struct friend *f) clock_gettime(CLOCK_MONOTONIC, &now); diff = timediff(f->av.lastsent, now); - if (diff.tv_nsec == 0 && diff.tv_nsec < toxavconfig.audio_frame_duration * 1000) { - diff.tv_nsec = toxavconfig.audio_frame_duration * 1000 - diff.tv_nsec; + if (diff.tv_nsec == 0 && diff.tv_nsec < toxavconfig.audio_frame_duration * 1E6) { + diff.tv_nsec = toxavconfig.audio_frame_duration * 1E6 - diff.tv_nsec; nanosleep(&diff, NULL); } f->av.lastsent = now; -- cgit v1.2.3