port: revert multithreaded audio experiments

until I can figure out how to fix all the funny concurrency issues that cropped up
This commit is contained in:
fgsfds committed 2024-05-19 19:44:34 +02:00
1 parent dce96a4a3d
commit de3b8ff548
16 files changed
+62 -174

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@
s32 audioInit(void);
s32 audioGetBytesBuffered(void);
s32 audioGetSamplesBuffered(void);
void audioSubmitBuffer(const s16 *buf, u32 size);
void audioSetNextBuffer(const s16 *buf, u32 len);
void audioEndFrame(void);
#endif
+1 -5
View File
@@ -35,11 +35,7 @@ void *sysMemZeroAlloc(const u32 size);
void sysMemFree(void *ptr);
// hns is specified in 100ns units
// do not use sysFrameLimiterSleep on any thread other than the main one
void sysFrameLimiterSleep(const s64 hns);
// us is specified in microseconds
void sysSleep(const s64 us);
void sysSleep(const s64 hns);
// yield CPU if supported (e.g. during a busy loop)
void sysCpuRelax(void);
-27
View File
@@ -1,27 +0,0 @@
#ifndef _IN_THREAD_H
#define _IN_THREAD_H
#include <PR/ultratypes.h>
#include "platform.h"
// TODO: backends
#ifndef PLATFORM_USE_PTHREAD
#error "No available thread backend."
#endif
#include <pthread.h>
#define SYSMUTEX_STATIC_INIT PTHREAD_MUTEX_INITIALIZER
typedef pthread_t systhread;
typedef pthread_mutex_t sysmutex;
typedef void *(*systhreadfn)(void *);
s32 sysThreadCreate(systhread *thread, systhreadfn func, void *arg);
s32 sysThreadJoin(systhread *thread, void **result);
void sysMutexLock(sysmutex *mtx);
void sysMutexUnlock(sysmutex *mtx);
#endif // _IN_THREAD_H