2022-04-08 08:30:31 +00:00
|
|
|
#ifndef MUSYX_PRIV_H
|
|
|
|
#define MUSYX_PRIV_H
|
|
|
|
|
2022-07-27 05:11:36 +00:00
|
|
|
#include "musyx/musyx.h"
|
2022-04-08 08:30:31 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2022-08-05 19:43:46 +00:00
|
|
|
|
|
|
|
typedef struct _SynthInfo {
|
|
|
|
u32 freq;
|
|
|
|
u8 unk[0x20c];
|
|
|
|
u8 voices;
|
|
|
|
u8 music;
|
|
|
|
u8 sfx;
|
|
|
|
u8 studios;
|
|
|
|
} SynthInfo;
|
|
|
|
|
2022-07-27 05:11:36 +00:00
|
|
|
typedef s32 (*SND_COMPARE)(u16*, u8*);
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
void dataInit(u32, s32); /* extern */
|
|
|
|
void dataInitStack(); /* extern */
|
|
|
|
s32 hwInit(s32*, u8, u8, s32); /* extern */
|
|
|
|
void s3dInit(s32); /* extern */
|
|
|
|
void seqInit(); /* extern */
|
|
|
|
void streamInit(); /* extern */
|
|
|
|
void synthInit(u32, u8); /* extern */
|
|
|
|
void vsInit(); /* extern */
|
2022-04-08 08:30:31 +00:00
|
|
|
void hwExit();
|
|
|
|
void dataExit();
|
|
|
|
void s3dExit();
|
|
|
|
void synthExit();
|
2022-07-27 05:11:36 +00:00
|
|
|
u32 synthGetTicksPerSecond(u32 seconds);
|
|
|
|
u16 sndRand(void);
|
|
|
|
s16 sndSin(u32 __x);
|
|
|
|
u8* sndBSearch(u16 *key,u8 *subTab,s32 mainTab,s32 len,SND_COMPARE cmp);
|
|
|
|
void sndConvertMs(u32* time);
|
|
|
|
void sndConvertTicks(u32* out, u32 seconds);
|
|
|
|
u32 sndConvert2Ms(u32 time);
|
2022-04-08 08:30:31 +00:00
|
|
|
|
2022-07-27 05:11:36 +00:00
|
|
|
extern SND_HOOKS salHooks;
|
2022-07-30 09:12:25 +00:00
|
|
|
|
|
|
|
/* Math */
|
|
|
|
void salApplyMatrix(const SND_FMATRIX* a, const SND_FVECTOR* b, SND_FVECTOR* out);
|
|
|
|
float salNormalizeVector(SND_FVECTOR* vec);
|
|
|
|
void salCrossProduct(SND_FVECTOR* out, const SND_FVECTOR* a, const SND_FVECTOR* b);
|
|
|
|
void salInvertMatrix(SND_FMATRIX* out, const SND_FMATRIX* in);
|
|
|
|
|
2022-04-08 08:30:31 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|