diff options
author | red031000 <rubenru09@aol.com> | 2020-05-29 18:45:08 +0100 |
---|---|---|
committer | red031000 <rubenru09@aol.com> | 2020-05-29 18:45:08 +0100 |
commit | 0d8876b37adebcda571659089dcff343fccdfc8b (patch) | |
tree | 0fc796c2d9a711cd8ba6f1919391a57174aa5b3f /arm9/lib/src/SND_main.c | |
parent | 83d33f36fcf46dec8ea99b86563a19885be4bd8e (diff) | |
parent | d6fd8d1ed926feebffab4154a84eb70a84083bfc (diff) |
Merge branch 'master' of https://github.com/martmists/pokediamond
Diffstat (limited to 'arm9/lib/src/SND_main.c')
-rw-r--r-- | arm9/lib/src/SND_main.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arm9/lib/src/SND_main.c b/arm9/lib/src/SND_main.c new file mode 100644 index 00000000..f533b87c --- /dev/null +++ b/arm9/lib/src/SND_main.c @@ -0,0 +1,28 @@ +#include "SND_main.h" + +#include "global.h" +#include "OS_mutex.h" + +static struct OSMutex sSndMutex; +static s32 sSndInitialized; + +// TODO remove these declarations once we have the functions in the headers +void OS_UnlockMutex(struct OSMutex *); +void OS_LockMutex(struct OSMutex *); + +ARM_FUNC void SND_Init(void) { + if (sSndInitialized) + return; + sSndInitialized = 1; + OS_InitMutex(&sSndMutex); + SND_CommandInit(); + SND_AlarmInit(); +} + +ARM_FUNC void SNDi_LockMutex(void) { + OS_LockMutex(&sSndMutex); +} + +ARM_FUNC void SNDi_UnlockMutex(void) { + OS_UnlockMutex(&sSndMutex); +} |