diff --git a/include/musyx/seq.h b/include/musyx/seq.h new file mode 100644 index 00000000..243895a9 --- /dev/null +++ b/include/musyx/seq.h @@ -0,0 +1,19 @@ +#include "musyx/musyx_priv.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern u16 seqMIDIPriority[8][16]; + +void sndSeqStop(s32 unk); +void sndSeqSpeed(s32 unk1, s32 unk2); +void sndSeqContinue(s32 unk); +void sndSeqMute(s32 unk1, s32 unk2, s32 unk3); +void sndSeqVolume(s32 unk1, s32 unk2, s32 unk3, s32 unk4); +u16 seqGetMIDIPriority(s32 unk1, s32 unk2); + +#ifdef __cplusplus +} +#endif + diff --git a/obj_files.mk b/obj_files.mk index 4fb3d2bf..69c033a0 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -783,7 +783,7 @@ MSL_PPCEABI_BARE_H :=\ MUSYX_FILES :=\ $(BUILD_DIR)/asm/musyx/seq.o\ $(BUILD_DIR)/asm/musyx/synth.o\ - $(BUILD_DIR)/asm/musyx/seq_api.o\ + $(BUILD_DIR)/src/musyx/seq_api.o\ $(BUILD_DIR)/asm/musyx/snd_synthapi.o\ $(BUILD_DIR)/asm/musyx/stream.o\ $(BUILD_DIR)/asm/musyx/synthdata.o\ diff --git a/src/musyx/seq_api.c b/src/musyx/seq_api.c new file mode 100644 index 00000000..5f6b21a0 --- /dev/null +++ b/src/musyx/seq_api.c @@ -0,0 +1,35 @@ +#include "musyx/seq.h" + +void sndSeqStop(s32 unk) { + hwDisableIrq(); + seqStop(unk); + hwEnableIrq(); +} + +void sndSeqSpeed(s32 unk1, s32 unk2) { + hwDisableIrq(); + seqSpeed(unk1, unk2); + hwEnableIrq(); +} + +void sndSeqContinue(s32 unk) { + hwDisableIrq(); + seqContinue(unk); + hwEnableIrq(); +} + +void sndSeqMute(s32 unk1, s32 unk2, s32 unk3) { + hwDisableIrq(); + seqMute(unk1, unk2, unk3); + hwEnableIrq(); +} + +void sndSeqVolume(s32 unk1, s32 unk2, s32 unk3, s32 unk4) { + hwDisableIrq(); + seqVolume(unk1, unk2, unk3, unk4); + hwEnableIrq(); +} + +u16 seqGetMIDIPriority(s32 arg0, s32 arg1) { + return seqMIDIPriority[(u8)arg0][(u8)arg1]; +}