new features:

future cancellation
  corking
  flushing
for playback streams in native protocol


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@152 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-08-22 21:13:58 +00:00
parent ea4805a0fd
commit 41295bbf56
20 changed files with 309 additions and 129 deletions

View file

@ -36,6 +36,7 @@
#include <pwd.h>
#include <signal.h>
#include <pthread.h>
#include <sys/time.h>
#include "util.h"
#include "xmalloc.h"
@ -192,3 +193,23 @@ char *pa_get_host_name(char *s, size_t l) {
s[l-1] = 0;
return s;
}
uint32_t pa_age(struct timeval *tv) {
struct timeval now;
uint32_t r;
assert(tv);
if (tv->tv_sec == 0)
return 0;
gettimeofday(&now, NULL);
r = (now.tv_sec-tv->tv_sec) * 1000000;
if (now.tv_usec >= tv->tv_usec)
r += now.tv_usec - tv->tv_usec;
else
r -= tv->tv_usec - now.tv_usec;
return r;
}