summaryrefslogtreecommitdiff
path: root/libjack
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-21 18:09:49 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-21 18:09:49 -0500
commitfdb9ad57475042eb1e0925d45b4ab19eb1ad96da (patch)
treeef595b3da9d4d572dab2eb5929ee9149639c0e09 /libjack
parent17b8b1048de892e2baaeed9e7dfc1bcf2ad8fb5e (diff)
downloadjack1-fdb9ad57475042eb1e0925d45b4ab19eb1ad96da.tar.gz
revert change from floor (x+0.5) to rint() in fons' frames/time sync code
Diffstat (limited to 'libjack')
-rw-r--r--libjack/transclient.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libjack/transclient.c b/libjack/transclient.c
index e28f83e..5a6fd08 100644
--- a/libjack/transclient.c
+++ b/libjack/transclient.c
@@ -281,8 +281,8 @@ jack_time_to_frames(const jack_client_t *client, jack_time_t usecs)
*/
int64_t du = usecs - time.current_wakeup;
int64_t dp = time.next_wakeup - time.current_wakeup;
- return time.frames + (int32_t) rint ((double) du / (double) dp
- * ectl->buffer_size);
+ return time.frames + (int32_t) floor (((double) du / (double) dp
+ * ectl->buffer_size) + 0.5);
}
return 0;
}
@@ -320,8 +320,8 @@ jack_frames_to_time(const jack_client_t *client, jack_nframes_t frames)
*/
int32_t df = frames - time.frames;
int64_t dp = time.next_wakeup - time.current_wakeup;
- return time.current_wakeup + (int64_t) rint ((double) df * (double) dp
- / ectl->buffer_size);
+ return time.current_wakeup + (int64_t) floor (((double) df * (double) dp
+ / ectl->buffer_size) + 0.5);
}
return 0;
}