webrtc audio

This commit is contained in:
Maxim Devaev
2022-05-29 01:29:01 +03:00
parent 3d4e9fbb1a
commit d4a9862a18
15 changed files with 1072 additions and 310 deletions

View File

@@ -67,7 +67,7 @@
#define A_COND_INIT(_cond) assert(!pthread_cond_init(_cond, NULL))
#define A_COND_DESTROY(_cond) assert(!pthread_cond_destroy(_cond))
#define A_COND_SIGNAL(...) assert(!pthread_cond_signal(__VA_ARGS__))
#define A_COND_WAIT_TRUE(_var, _cond, _mutex) { while(!_var) assert(!pthread_cond_wait(_cond, _mutex)); }
#define A_COND_WAIT_TRUE(_var, _cond, _mutex) { while(!(_var)) assert(!pthread_cond_wait(_cond, _mutex)); }
#ifdef WITH_PTHREAD_NP

View File

@@ -126,13 +126,13 @@ INLINE uint64_t get_now_monotonic_u64(void) {
return (uint64_t)(ts.tv_nsec / 1000) + (uint64_t)ts.tv_sec * 1000000;
}
#undef X_CLOCK_MONOTONIC
INLINE uint64_t get_now_id(void) {
uint64_t now = get_now_monotonic_u64();
return (uint64_t)triple_u32(now) | ((uint64_t)triple_u32(now + 12345) << 32);
}
#undef X_CLOCK_MONOTONIC
INLINE long double get_now_real(void) {
time_t sec;
long msec;