mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-30 08:26:24 -04:00
4df8ccc871
* 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
37 lines
932 B
C++
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);
|
|
}
|