Link snd_service.c and hw_memory.c

This commit is contained in:
2022-07-26 22:11:36 -07:00
parent 0e20e67870
commit e88f46cb28
12 changed files with 158 additions and 10 deletions

View File

@@ -1,6 +1,8 @@
#ifndef MUSYX_DSP_IMPORT_H
#define MUSYX_DSP_IMPORT_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -15,6 +15,11 @@ typedef struct _SynthInfo {
u8 studios;
} SynthInfo;
typedef struct _SND_HOOKS {
void *(*malloc)(u32 len);
void (*free)(void *addr);
} SND_HOOKS;
#ifdef __cplusplus
}
#endif

View File

@@ -1,11 +1,12 @@
#ifndef MUSYX_PRIV_H
#define MUSYX_PRIV_H
#include "types.h"
#include "musyx/musyx.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef s32 (*SND_COMPARE)(u16*, u8*);
void dataInit(u32, s32); /* extern */
void dataInitStack(); /* extern */
@@ -19,7 +20,15 @@ void hwExit();
void dataExit();
void s3dExit();
void synthExit();
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);
extern SND_HOOKS salHooks;
#ifdef __cplusplus
}
#endif

View File

@@ -62,6 +62,10 @@ typedef void* unkptr;
#endif
#endif
#ifndef ATTRIBUTE_ALIGN
#define ATTRIBUTE_ALIGN(num) __attribute__ ((aligned (num)))
#endif
// where should these go?
void srand(int);
int rand();