2023-06-29 10:56:20 +00:00
|
|
|
#ifndef _MUSYX_HARDWARE
|
|
|
|
#define _MUSYX_HARDWARE
|
|
|
|
|
|
|
|
#include "musyx/musyx_priv.h"
|
2023-06-29 23:12:29 +00:00
|
|
|
|
2023-06-29 10:56:20 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2023-06-29 23:12:29 +00:00
|
|
|
bool hwIsStudioActive(u8 studio);
|
2023-09-26 01:45:49 +00:00
|
|
|
void* hwGetStreamPlayBuffer(u8 hwStreamHandle);
|
|
|
|
s32 hwInit(u32* frq, u16 numVoices, u16 numStudios, u32 flags); /* extern */
|
|
|
|
void hwInitSamplePlayback(u32 v, u16 smpID, void* newsmp, u32 set_defadsr, u32 prio,
|
|
|
|
u32 callbackUserValue, u32 setSRC, u8 itdMode);
|
|
|
|
void hwSetVolume(u32 v, u8 table, float vol, u32 pan, u32 span, float auxa, float auxb);
|
|
|
|
void hwSetPitch(u32 v, u16 speed);
|
|
|
|
void hwEnableIrq();
|
|
|
|
void hwDisableIrq();
|
|
|
|
void* hwTransAddr(void* samples);
|
|
|
|
void hwExitStream(u8 id);
|
2023-10-18 17:44:26 +00:00
|
|
|
void hwSaveSample(void* header, void* data);
|
|
|
|
void hwRemoveSample(void* header, void* data);
|
|
|
|
u32 hwGetVirtualSampleState(u32 voice);
|
|
|
|
bool hwVoiceInStartup(u32 v);
|
|
|
|
void hwBreak(s32 vid);
|
|
|
|
u32 hwGetPos(u32 v);
|
2023-10-18 18:14:12 +00:00
|
|
|
void hwInitSampleMem(u32 baseAddr, u32 length);
|
|
|
|
void hwExitSampleMem();
|
|
|
|
void hwSetVirtualSampleLoopBuffer(u32 voice, void* addr, u32 len);
|
|
|
|
u16 hwGetSampleID(u32 voice);
|
|
|
|
u8 hwGetSampleType(u32 voice);
|
2023-10-21 07:40:09 +00:00
|
|
|
void hwChangeStudioMix(u8 studio, u32 isMaster);
|
2023-10-21 23:00:13 +00:00
|
|
|
void hwSetStreamLoopPS(u32 voice, u8 ps);
|
|
|
|
void hwFlushStream(void* base, u32 offset, u32 bytes, unsigned char hwStreamHandle, void (*callback)(u32),
|
|
|
|
u32 user);
|
2023-10-21 17:29:58 +00:00
|
|
|
#if MUSY_VERSION >= MUSY_VERSION_CHECK(2, 0, 3)
|
2023-10-21 23:00:13 +00:00
|
|
|
void hwSetFilter(u32 v, unsigned char mode, unsigned short coefA, unsigned short coefB);
|
|
|
|
void hwLowPassFrqToCoef(u32 frq, unsigned short* _a0, unsigned short* _b1);
|
2023-10-21 17:29:58 +00:00
|
|
|
#endif
|
2023-06-29 10:56:20 +00:00
|
|
|
|
2023-10-21 17:48:50 +00:00
|
|
|
extern u32 aramSize;
|
|
|
|
extern u8* aramBase;
|
2023-06-29 10:56:20 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // _MUSYX_HARDWARE
|