Remove callback from cosmoaudio API

Using callbacks is still problematic with cosmo_dlopen() due to the need
to restore the TLS register. So using callbacks is even more strict than
using signal handlers. We are better off introducing a cosmoaudio_poll()
function. It makes the API more UNIX-like. How bad could the latency be?
This commit is contained in:
Justine Tunney 2024-09-07 17:42:15 -07:00
parent d99f066114
commit d50d954a3c
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
17 changed files with 433 additions and 158 deletions

View file

@ -1130,7 +1130,7 @@ static bool ShouldDraw(void) {
static struct timespec next;
if (!isdragging)
return true;
now = timespec_real();
now = timespec_mono();
if (timespec_cmp(now, next) > 0 && !HasPendingInput()) {
next = timespec_add(now, timespec_frommicros(1. / 24 * 1e6));
return true;