Files
dusklight/libs/JSystem/src/JAudio2/osdsp.cpp
T
Luke Street 4df8ccc871 Reorganize library code into libs/ (#3119)
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}

* Update configure.py and project.py for new libs structure

* Refactor `#include <dolphin/x.h>` -> `<x.h>`

* Remove `__REVOLUTION_SDK__` forwards from dolphin

* Fix dolphin/ references in revolution

* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`

* Always build TRK against dolphin headers

* Resolve revolution SDK header resolution issues
2026-03-01 14:35:36 -08:00

37 lines
932 B
C++

#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JAudio2/osdsp.h"
#include "JSystem/JAudio2/osdsp_task.h"
#include <os.h>
#include <dsp.h>
extern "C" void __DSP_insert_task(DSPTaskInfo*);
extern "C" void __DSP_boot_task(DSPTaskInfo*);
DSPTaskInfo* DSPAddTask(DSPTaskInfo* task) {
if (DSP_prior_task == NULL) {
OSReport("Prior Task is not inited\n");
return NULL;
}
BOOL status = OSDisableInterrupts();
__DSP_insert_task(task);
task->state = 0;
task->flags = 1;
OSRestoreInterrupts(status);
return task;
}
void DSPAddPriorTask(STRUCT_DSP_TASK* task) {
if (DSP_prior_task != NULL) {
OSReport("Already inited prior DSP task\n");
return;
}
BOOL status = OSDisableInterrupts();
DSP_prior_task = (DSPTaskInfo*)task;
task->state = 0;
task->flags = 1;
__DSP_boot_task((DSPTaskInfo*)task);
OSRestoreInterrupts(status);
}