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 */ + + +