mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-29 05:50:27 +00:00
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:
parent
d99f066114
commit
d50d954a3c
17 changed files with 433 additions and 158 deletions
|
@ -40,6 +40,7 @@
|
|||
#include "libc/calls/ucontext.h"
|
||||
#include "libc/ctype.h"
|
||||
#include "libc/cxxabi.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
|
@ -56,7 +57,9 @@
|
|||
#include "libc/nexgen32e/bench.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/nt/console.h"
|
||||
#include "libc/nt/enum/threadpriority.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/nt/thread.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/sock/struct/pollfd.h"
|
||||
|
@ -1398,6 +1401,10 @@ static void TryToOpenFrameBuffer(void) {
|
|||
int main(int argc, char *argv[]) {
|
||||
sigset_t wut;
|
||||
ShowCrashReports();
|
||||
#ifdef __x86_64__
|
||||
if (IsWindows())
|
||||
SetThreadPriority(GetCurrentThread(), kNtThreadPriorityHighest);
|
||||
#endif
|
||||
gamma_ = 2.4;
|
||||
volscale_ = 1.f;
|
||||
dither_ = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue