Files
tp/include/JSystem/JAudio2/JASAudioThread.h
T

37 lines
927 B
C
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef JASAUDIOTHREAD_H
#define JASAUDIOTHREAD_H
#include "JSystem/JAudio2/JASGadget.h"
2023-06-09 11:55:15 +03:00
#include "JSystem/JKernel/JKRThread.h"
2021-03-28 22:49:05 +02:00
2023-06-09 11:55:15 +03:00
enum JASAudioMessage {
AUDIOMSG_DMA = 0,
AUDIOMSG_DSP = 1,
AUDIOMSG_STOP = 2,
};
2024-04-12 00:10:30 -06:00
/**
* @ingroup jsystem-jaudio
*
*/
2023-06-09 11:55:15 +03:00
struct JASAudioThread : public JKRThread, public JASGlobalInstance<JASAudioThread> {
2025-11-30 14:23:42 -08:00
JASAudioThread(int, int, u32);
static void create(s32);
void stop();
virtual void* run();
static void DMACallback();
static void DSPCallback(void*);
virtual ~JASAudioThread() {}
2022-12-30 16:19:57 -07:00
2023-09-07 09:50:36 -07:00
static JASAudioThread* getThreadPointer() { return getInstance(); }
static int getDSPSyncCount() { return snIntCount; }
static void setDSPSyncCount(u32 param_0) { snIntCount = param_0; }
2023-06-09 11:55:15 +03:00
/* 0x7c */ OSThreadQueue sThreadQueue;
/* 0x84 */ bool sbPauseFlag; // type unsure
static volatile int snIntCount; // type unsure
2022-12-30 16:19:57 -07:00
};
2021-03-28 22:49:05 +02:00
#endif /* JASAUDIOTHREAD_H */