diff options
Diffstat (limited to 'arm7')
-rw-r--r-- | arm7/lib/include/SND_channel.h | 42 | ||||
-rw-r--r-- | arm7/lib/include/SND_exChannel.h | 2 | ||||
-rw-r--r-- | arm7/lib/include/registers.h | 7 |
3 files changed, 51 insertions, 0 deletions
diff --git a/arm7/lib/include/SND_channel.h b/arm7/lib/include/SND_channel.h new file mode 100644 index 00000000..5f90aa66 --- /dev/null +++ b/arm7/lib/include/SND_channel.h @@ -0,0 +1,42 @@ +#ifndef GUARD_SND_CHANNEL_H +#define GUARD_SND_CHANNEL_H + +#include "nitro/types.h" + +void SND_SetupChannelPcm( + s32 chnIdx, + const void *data, + s32 format, + s32 loop, + s32 loopStart, + s32 loopLen, + s32 volume, + s32 volumeDiv, + s32 timer, + s32 pan +); + +void SND_SetupChannelPsg( + s32 chnIdx, + s32 waveDuty, + s32 volume, + s32 volumeDiv, + s32 timer, + s32 pan +); + +void SND_SetupChannelNoise( + s32 chnIdx, + s32 volume, + s32 volumeDiv, + s32 timer, + s32 pan +); + +void SND_StopChannel(s32 chnIdx, s32 hold); + +void SND_SetChannelVolume(s32 chnIdx, s32 volume, s32 volumeDiv); +void SND_SetChannelPan(s32 chnIdx, s32 pan); +void SND_SetChannelTimer(s32 chnIdx, s32 timer); + +#endif //GUARD_SND_CHANNEL_H diff --git a/arm7/lib/include/SND_exChannel.h b/arm7/lib/include/SND_exChannel.h index 8450a629..cc07d34f 100644 --- a/arm7/lib/include/SND_exChannel.h +++ b/arm7/lib/include/SND_exChannel.h @@ -11,4 +11,6 @@ void SND_UpdateExChannel(void); void SND_ExChannelMain(BOOL update); void SND_FreeExChannel(struct SNDExChannel *chn); +typedef void (*SNDExChannelCallback)(struct SNDExChannel *chn, s32 status, void *userData); + #endif //GUARD_SND_EXCHANNEL_H diff --git a/arm7/lib/include/registers.h b/arm7/lib/include/registers.h index 1fb1e9ca..bc55d0d8 100644 --- a/arm7/lib/include/registers.h +++ b/arm7/lib/include/registers.h @@ -5,6 +5,13 @@ #define reg_EXTKEYIN (*(REGType16v *)0x4000136) +#define reg_SOUNDxCNT_STAT(x) (*((REGType8v *)0x4000403 + ((int)(x) * 0x10))) +#define reg_SOUNDxCNT(x) (*((REGType32v *)0x4000400 + ((int)x) * 0x10)) +#define reg_SOUNDxSAD(x) (*((REGType32v *)0x4000404 + ((int)x) * 0x10)) +#define reg_SOUNDxTMR(x) (*((REGType16v *)0x4000408 + ((int)x) * 0x10)) +#define reg_SOUNDxPNT(x) (*((REGType16v *)0x400040A + ((int)x) * 0x10)) +#define reg_SOUNDxLEN(x) (*((REGType32v *)0x400040C + ((int)x) * 0x10)) + #define EXTKEYIN_X (1<<0) #define EXTKEYIN_Y (1<<1) #define EXTKEYIN_DEBUG (1<<3) |