From 0c3ed17dd43551b41215bd5d2df5cd88a9519e20 Mon Sep 17 00:00:00 2001 From: dwsJason Date: Wed, 13 Jan 2021 20:48:23 -0500 Subject: [PATCH] import: header file the jlsound functions, with the function prototypes --- joeylib/src/iigs/sound.h | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 joeylib/src/iigs/sound.h diff --git a/joeylib/src/iigs/sound.h b/joeylib/src/iigs/sound.h new file mode 100644 index 0000000..2d4c224 --- /dev/null +++ b/joeylib/src/iigs/sound.h @@ -0,0 +1,56 @@ +/* + JoeyLib Sound Header File, with Sound Function Prototypes +*/ +#ifndef JL_SOUND_H +#define JL_SOUND_H + +typedef struct +{ + +} jlSound_t; + +/* jlSoundT - A pointer to a sound bank / collection of sounds */ +typedef jlSound_t* jlSoundT; + +/* Call this before any other Sound Function */ +void jlSoundStartup(); +/* Call this when done, for proper shutdown */ +void jlSoundShutdown(); + +/* + Load .jla Sound Bank into memory, or into DOC RAM +*/ +jlSoundT jlSoundLoad(const char* pSoundBankPath); +/* + Load .jla Sound Bank from memory, into DOC RAM + DO NOT FREE THIS MEMORY (pointers in the library will point into it) + it may be free after the jlSoundFree hsa been called +*/ +jlSoundT jlSoundLoadAt(const char* pBankInRAM); +/* + Returns back an index into the audio definition table, which is required + in order to call jlSoundPlay +*/ +signed short jlSoundFind(jlSoundT soundbank, const char* sfxName); +/* + Play a Sound +*/ +void jlSoundPlay(jlSoundT soundbank, signed short audio_index); +/* + Return the number of SFX in this Bank +*/ +signed short jlSoundGetNumSFX(jlSoundT soundbank); +/* + Return a C string name of the sound effect with this index + DO NOT FREE THIS POINTER +*/ +char *jlSoundGetName(signed short audio_index); +/* + Called when you are done with this soundbank +*/ +void jlSoundFree(jlSoundT soundbank); + +#endif /* JL_SOUND_H */ + + +