ratox

FIFO based tox client
git clone git://git.2f30.org/ratox
Log | Files | Refs | README | LICENSE

commit e9f47ae7f10d1b05dc56004e442e239fcbecd6a2
parent e3995fbf95ce419183df5dac5d48a30d989e8e37
Author: z3bra <contactatz3bradotorg>
Date:   Sat, 19 Nov 2016 11:02:27 +0100

Reduce time between sample sending

Start sending the next audio frame before the previous frame is done
sending. This is for preventing the peer to receive "blanks" in the
audio channel.

Diffstat:
Mratox.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ratox.c b/ratox.c @@ -500,8 +500,8 @@ sendfriendcalldata(struct friend *f) clock_gettime(CLOCK_MONOTONIC, &now); diff = timediff(f->av.lastsent, now); - if (diff.tv_sec == 0 && diff.tv_nsec < AUDIOFRAME * 1E6) { - diff.tv_nsec = AUDIOFRAME * 1E6 - diff.tv_nsec; + if (diff.tv_sec == 0 && diff.tv_nsec < (AUDIOFRAME - 1) * 1E6) { + diff.tv_nsec = (AUDIOFRAME - 1) * 1E6 - diff.tv_nsec; nanosleep(&diff, NULL); } clock_gettime(CLOCK_MONOTONIC, &f->av.lastsent);