summaryrefslogtreecommitdiff
path: root/arm9/lib/include
diff options
context:
space:
mode:
authorred031000 <rubenru09@aol.com>2020-05-29 18:43:59 +0100
committerGitHub <noreply@github.com>2020-05-29 18:43:59 +0100
commitd6fd8d1ed926feebffab4154a84eb70a84083bfc (patch)
tree3ca2a3440eac118db299131611212081a654a114 /arm9/lib/include
parent501072dd9fb699087cecb5404e0c363b63cfa9c6 (diff)
parent34d432730cdae249d7b21cba2278b2cb1cb2f342 (diff)
Merge pull request #126 from ipatix/SND_files
decompile SND_* files
Diffstat (limited to 'arm9/lib/include')
-rw-r--r--arm9/lib/include/SND_alarm.h25
-rw-r--r--arm9/lib/include/SND_bank.h95
-rw-r--r--arm9/lib/include/SND_command.h67
-rw-r--r--arm9/lib/include/SND_interface.h62
-rw-r--r--arm9/lib/include/SND_main.h185
-rw-r--r--arm9/lib/include/SND_util.h14
-rw-r--r--arm9/lib/include/SND_work.h92
7 files changed, 540 insertions, 0 deletions
diff --git a/arm9/lib/include/SND_alarm.h b/arm9/lib/include/SND_alarm.h
new file mode 100644
index 00000000..cf5db862
--- /dev/null
+++ b/arm9/lib/include/SND_alarm.h
@@ -0,0 +1,25 @@
+#ifndef GUARD_SND_ALARM_H
+#define GUARD_SND_ALARM_H
+
+#include "global.h"
+#include "OS_alarm.h"
+
+typedef void (*SNDAlarmCallback)(void *);
+
+struct SNDAlarm {
+ u8 enable; // 0x00
+ u8 id; // 0x01
+ u16 unk_2; // 0x02
+ OSTick tick; // 0x04
+ OSTick period; // 0x0C
+ OSAlarm alarm; // 0x14
+}; // size = 0x40
+
+void SND_AlarmInit(void);
+void SNDi_IncAlarmId(u32 idx);
+u8 SNDi_SetAlarmHandler(u32 idx, SNDAlarmCallback cb, void *data);
+void SNDi_CallAlarmHandler(s32 idx);
+
+#define SND_ALARM_COUNT 8
+
+#endif
diff --git a/arm9/lib/include/SND_bank.h b/arm9/lib/include/SND_bank.h
new file mode 100644
index 00000000..b9000d57
--- /dev/null
+++ b/arm9/lib/include/SND_bank.h
@@ -0,0 +1,95 @@
+#ifndef GUARD_SND_BANK_H
+#define GUARD_SND_BANK_H
+
+#include "global.h"
+
+#include "SND_main.h"
+
+#define SND_INST_ILLEGAL 0
+#define SND_INST_PCM 1
+#define SND_INST_PSG 2
+#define SND_INST_NOISE 3
+#define SND_INST_DIRECTPCM 4
+#define SND_INST_DUMMY 5
+#define SND_INST_DRUM_TABLE 16
+#define SND_INST_KEY_SPLIT 17
+
+#define SND_BANK_MAX_WAVEARC 4
+#define SND_INST_MAX_KEYSPLIT 8
+
+#define SND_INST_OFFSET_TYPE(off) ((u8)off)
+#define SND_INST_OFFSET_NORMAL(bank, off) ((struct SNDInstParam *)((u8 *)bank + (u32)(off >> 8)))
+#define SND_INST_OFFSET_DRUMS(bank, off) ((struct SNDDrumSet *)((u8 *)bank + (u32)(off >> 8)))
+#define SND_INST_OFFSET_KEYSPL(bank, off) ((struct SNDKeySplit *)((u8 *)bank + (u32)(off >> 8)))
+
+struct SNDWaveArc;
+
+struct SNDWaveArcLink {
+ struct SNDWaveArc *waveArc; // 0x0
+ struct SNDWaveArcLink *waveArcLLnext; // 0x4
+}; // size = 0x8
+
+struct SNDBankData {
+ struct SNDBinaryFileHeader fileHeader; // 0x00
+ struct SNDBinaryBlockHeader blockHeader; // 0x10
+ struct SNDWaveArcLink waveArcLinks[SND_BANK_MAX_WAVEARC]; // 0x18
+ u32 instCount; // 0x38
+ u32 instOffsets[]; // 0x3C
+}; // size = 0x40
+
+struct SNDWaveArc {
+ struct SNDBinaryFileHeader fileHeader; // 0x00
+ struct SNDBinaryBlockHeader blockHeader; // 0x10
+ struct SNDWaveArcLink *waveArcLLHead; // 0x18
+ u8 unk_1C[28]; // 0x1C
+ u32 waveCount; // 0x38
+ u32 waveOffsets[]; // 0x3C
+}; // size = 0x3C
+
+struct SNDInstParam {
+ u16 wave[2]; // 0x0
+ u8 rootKey; // 0x4
+ u8 envAttack; // 0x5
+ u8 envDecay; // 0x6
+ u8 envSustain; // 0x7
+ u8 envRelease; // 0x8
+ u8 pan; // 0x9
+}; // size = 0xA
+
+struct SNDInstData {
+ u8 type; // 0x0
+ u8 unk_1; // 0x1
+ struct SNDInstParam param; // 0x2
+}; // size = 0xC
+
+struct SNDKeySplit {
+ u8 key[SND_INST_MAX_KEYSPLIT]; // 0x0
+ struct SNDInstData instruments[]; // 0x8
+}; // size = 0x8
+
+struct SNDDrumSet {
+ u8 minKey;
+ u8 maxKey;
+ struct SNDInstData instruments[];
+}; // size = 0x2
+
+struct SNDInstPos {
+ u32 program; // 0x0
+ u32 index; // 0x4
+}; // size = 0x8
+
+struct SNDWaveData {
+ struct SNDWaveParam param; // 0x0
+ u8 sampleData[]; // 0xC
+}; // size = 0xC
+
+void SND_AssignWaveArc(struct SNDBankData *bankData, s32 index, struct SNDWaveArc *waveArc);
+void SND_DestroyBank(struct SNDBankData *bankData);
+void SND_DestroyWaveArc(struct SNDWaveArc *waveArc);
+struct SNDInstPos SND_GetFirstInstDataPos(const struct SNDBankData *bankData);
+BOOL SND_GetNextInstData(const struct SNDBankData *bankData, struct SNDInstData *instData, struct SNDInstPos *instPos);
+u32 SND_GetWaveDataCount(const struct SNDWaveArc *waveArc);
+void SND_SetWaveDataAddress(struct SNDWaveArc *waveArc, s32 index, const struct SNDWaveData *waveData);
+const struct SNDWaveData *SND_GetWaveDataAddress(const struct SNDWaveArc *waveArc, s32 index);
+
+#endif // GUARD_SND_BANK_H
diff --git a/arm9/lib/include/SND_command.h b/arm9/lib/include/SND_command.h
new file mode 100644
index 00000000..ff392833
--- /dev/null
+++ b/arm9/lib/include/SND_command.h
@@ -0,0 +1,67 @@
+#ifndef GUARD_SND_COMMAND_H
+#define GUARD_SND_COMMAND_H
+
+#include "global.h"
+
+#define SND_CMD_COUNT 256
+#define SND_CMD_ARG_MAX 4
+
+#define SND_CMD_FLAG_NOBLOCK 0x0
+#define SND_CMD_FLAG_BLOCK 0x1
+#define SND_CMD_FLAG_IMMEDIATE 0x2
+
+#define SND_CMD_START_SEQ 0x00
+#define SND_CMD_STOP_SEQ 0x01
+#define SND_CMD_PREPARE_SEQ 0x02
+#define SND_CMD_START_PREPARED_SEQ 0x03
+#define SND_CMD_PAUSE_SEQ 0x04
+#define SND_CMD_SKIP_SEQ 0x05
+#define SND_CMD_PLAYER_PARAM 0x06
+#define SND_CMD_TRACK_PARAM 0x07
+#define SND_CMD_MUTE_TRACK 0x08
+#define SND_CMD_ALLOCATABLE_CHANNEL 0x09
+#define SND_CMD_PLAYER_LOCAL_VAR 0x0A
+#define SND_CMD_PLAYER_GLOBAL_VAR 0x0B
+#define SND_CMD_START_TIMER 0x0C
+#define SND_CMD_STOP_TIMER 0x0D
+#define SND_CMD_SETUP_CHANNEL_PCM 0x0E
+#define SND_CMD_SETUP_CHANNEL_PSG 0x0F
+#define SND_CMD_SETUP_CHANNEL_NOISE 0x10
+#define SND_CMD_SETUP_CAPTURE 0x11
+#define SND_CMD_SETUP_ALARM 0x12
+#define SND_CMD_CHANNEL_TIMER 0x13
+#define SND_CMD_CHANNEL_VOLUME 0x14
+#define SND_CMD_CHANNEL_PAN 0x15
+#define SND_CMD_SURROUND_DECAY 0x16
+#define SND_CMD_MASTER_VOLUME 0x17
+#define SND_CMD_MASTER_PAN 0x18
+#define SND_CMD_OUTPUT_SELECTOR 0x19
+#define SND_CMD_LOCK_CHANNEL 0x1A
+#define SND_CMD_UNLOCK_CHANNEL 0x1B
+#define SND_CMD_STOP_UNLOCKED_CHANNEL 0x1C
+#define SND_CMD_SET_SHARED_WORK 0x1D
+#define SND_CMD_INVALIDATE_SEQ 0x1E
+#define SND_CMD_INVALIDATE_BANK 0x1F
+#define SND_CMD_INVALIDATE_WAVE 0x20
+#define SND_CMD_READ_DRIVER_INFO 0x21
+
+struct SNDCommand {
+ struct SNDCommand *llNext; // 0x0
+ s32 id; // 0x4
+ u32 arg[SND_CMD_ARG_MAX]; // 0x8
+}; // size = 0x18
+
+void SND_CommandInit(void);
+const struct SNDCommand *SND_RecvCommandReply(u32 flags);
+struct SNDCommand *SND_AllocCommand(u32 flags);
+void SND_PushCommand(struct SNDCommand *cmd);
+BOOL SND_FlushCommand(u32 flags);
+void SND_WaitForCommandProc(u32 tag);
+void SND_WaitForFreeCommand(s32 count);
+u32 SND_GetCurrentCommandTag(void);
+BOOL SND_IsFinishedCommandTag(u32 tag);
+s32 SND_CountFreeCommand(void);
+s32 SND_CountReservedCommand(void);
+s32 SND_CountWaitingCommand(void);
+
+#endif // GUARD_SND_COMMAND_H
diff --git a/arm9/lib/include/SND_interface.h b/arm9/lib/include/SND_interface.h
new file mode 100644
index 00000000..bd2c3869
--- /dev/null
+++ b/arm9/lib/include/SND_interface.h
@@ -0,0 +1,62 @@
+#ifndef GUARD_SND_INTERFACE_H
+#define GUARD_SND_INTERFACE_H
+
+#include "global.h"
+#include "SND_bank.h"
+#include "SND_work.h"
+
+void SND_StartSeq(s32 player, const void *seqBasePtr, u32 seqOffset, struct SNDBankData *bankData);
+void SND_StopSeq(s32 player);
+void SND_PrepareSeq(s32 player, const void *seqBasePtr, u32 seqOffset, struct SNDBankData *bankData);
+void SND_StartPreparedSeq(s32 player);
+void SND_PauseSeq(s32 player, BOOL flag);
+
+void SND_SetPlayerTempoRatio(s32 player, s32 ratio);
+void SND_SetPlayerVolume(s32 player, s32 volume);
+void SND_SetPlayerChannelPriority(s32 player, s32 prio);
+void SND_SetPlayerLocalVariable(s32 player, s32 varNo, s16 var);
+void SND_SetPlayerGlobalVariable(s32 varNo, s16 var);
+
+void SND_SetTrackVolume(s32 player, u32 trackBitMask, s32 volume);
+void SND_SetTrackPitch(s32 player, u32 trackBitMask, s32 pitch);
+void SND_SetTrackPan(s32 player, u32 trackBitMask, s32 pan);
+void SND_SetTrackPanRange(s32 player, u32 trackBitMask, s32 panRange);
+void SND_SetTrackModDepth(s32 player, u32 trackBitMask, s32 depth);
+void SND_SetTrackModSpeed(s32 player, u32 trackBitMask, s32 speed);
+void SND_SetTrackAllocatableChannel(s32 player, u32 trackBitMask, u32 chnBitMask);
+void SND_SetTrackMute(s32 player, u32 trackBitMask, BOOL flag);
+
+void SND_StartTimer(u32 chnBitMask, u32 capBitMask, u32 alarmBitMask, u32 flags);
+void SND_StopTimer(u32 chnBitMask, u32 capBitMask, u32 alarmBitMask, u32 flags);
+
+void SND_SetupCapture(s32 capture, s32 format, void *bufferPtr, u32 length, BOOL loopFlag, s32 in, s32 out);
+void SND_SetupAlarm(s32 alarm, u32 tick, u32 period, SNDAlarmCallback cb, void *userData);
+
+void SND_StopUnlockedChannel(u32 chnBitMask, u32 flags);
+void SND_LockChannel(u32 chnBitMask, u32 flags);
+void SND_UnlockChannel(u32 chnBitMask, u32 flags);
+
+void SND_SetChannelTimer(u32 chnBitMask, s32 timer);
+void SND_SetChannelVolume(u32 chnBitMask, s32 volume, s32 chnDataShift);
+void SND_SetChannelPan(u32 chnBitMask, s32 pan);
+void SND_SetupChannelPcm(s32 chn, s32 waveFormat, const void *dataAddr, s32 loopMode, s32 loopStart, s32 dataLen, s32 volume, s32 chnDataShift, s32 timer, s32 pan);
+void SND_SetupChannelPsg(s32 chn, s32 sndDuty, s32 volume, s32 chnDataShift, s32 timer, s32 pan);
+void SND_SetupChannelNoise(s32 chn, s32 volume, s32 chnDataShift, s32 timer, s32 pan);
+
+void SND_InvalidateSeqData(const void *start, const void *end);
+void SND_InvalidateBankData(const void *start, const void *end);
+void SND_InvalidateWaveData(const void *start, const void *end);
+
+void SND_SetMasterVolume(s32 volume);
+void SND_SetOutputSelector(s32 left, s32 right, s32 channel1, s32 channel3);
+void SND_SetMasterPan(s32 pan);
+void SND_ResetMasterPan(void);
+
+void SND_ReadDriverInfo(struct SNDDriverInfo *info);
+
+void SNDi_SetPlayerParam(s32 player, u32 offset, u32 data, s32 size);
+void SNDi_SetTrackParam(s32 player, u32 trackBitMask, u32 offset, u32 data, s32 size);
+void SNDi_SetSurroundDecay(s32 decay);
+void SNDi_SkipSeq(s32 player, u32 tick);
+
+#endif // GUARD_SND_INTERFACE_H
diff --git a/arm9/lib/include/SND_main.h b/arm9/lib/include/SND_main.h
new file mode 100644
index 00000000..7412c1ae
--- /dev/null
+++ b/arm9/lib/include/SND_main.h
@@ -0,0 +1,185 @@
+#ifndef GUARD_SND_MAIN_H
+#define GUARD_SND_MAIN_H
+
+#include "global.h"
+
+void SNDi_UnlockMutex(void);
+void SNDi_LockMutex(void);
+void SND_Init(void);
+
+struct SNDBinaryFileHeader {
+ s8 signature[4]; // 0x0
+ u16 byteOrder; // 0x4
+ u16 version; // 0x6
+ u32 fileSize; // 0x8
+ u16 headerSize; // 0xC
+ u16 dataBlocks; // 0xE
+}; // size = 0x10
+
+typedef struct SNDBinaryBlockHeader {
+ u32 type; // 0x0
+ u32 size; // 0x4
+}; // size = 0x8
+
+struct SNDWaveParam {
+ u8 format; // 0x0
+ u8 loopEnabled; // 0x1
+ u16 samplerate; // 0x2
+ u16 timer; // 0x4
+ u16 loopStart; // 0x6
+ u32 loopLength; // 0x8
+}; // size = 0xC
+
+struct SNDLfoParam {
+ u8 target; // 0x0
+ u8 speed; // 0x1
+ u8 depth; // 0x2
+ u8 range; // 0x3
+ u16 delay; // 0x4
+}; // size = 0x6
+
+struct SNDLfo {
+ struct SNDLfoParam param; // 0x0
+ u16 delayCounter; // 0x6
+ u16 counter; // 0x8
+}; // size = 0xA
+
+struct SNDExChannel {
+ u8 id; // 0x00
+ u8 type; // 0x01
+ u8 envStatus; // 0x02
+
+ struct {
+ u8 active : 1;
+ u8 start : 1;
+ u8 autoSweep : 1;
+ u8 syncFlag : 5;
+ } flags; // 0x03
+
+ u8 panRange; // 0x04
+ u8 rootMidiKey; // 0x05
+ s16 userDecay2; // 0x06
+
+ u8 midiKey; // 0x08
+ u8 velocity; // 0x09
+ s8 initPan; // 0x0A
+ s8 userPan; // 0x0B
+
+ s16 userDecay; // 0x0C
+ s16 userPitch; // 0x0E
+
+ s32 envAttenuation; // 0x10
+ s32 sweepCounter; // 0x14
+ s32 sweepLength; // 0x18
+
+ u8 envAttack; // 0x1C
+ u8 envSustain; // 0x1D
+ u16 envDecay; // 0x1E
+ u16 envRelease; // 0x20
+ u8 priority; // 0x22
+ u8 pan; // 0x23
+ u16 volume; // 0x24
+ u16 timer; // 0x26
+
+ struct SNDLfo lfo; // 0x28
+
+ s16 sweepPitch; // 0x32
+
+ s32 length; // 0x34
+
+ struct SNDWaveParam waveParam; // 0x38
+
+ union {
+ const void *waveDataPtr;
+ u32 dutyCycle;
+ }; // 0x44
+
+ void (*callback)(struct SNDExChannel *chn, u32 status, void *userData); // 0x48
+ void *callbackUserData; // 0x4C
+
+ struct SNDExChannel *channelLLNext; // 0x50
+}; // size = 0x54
+
+#define SND_TRACK_COUNT_PER_PLAYER 16
+#define SND_INVALID_TRACK_INDEX 0xFF
+
+struct SNDPlayer {
+ struct {
+ u8 active : 1;
+ u8 prepared : 1;
+ u8 paused : 1;
+ } flags; // 0x0
+
+ u8 playerId; // 0x1
+ u8 unk_2[2]; // 0x2
+
+ u8 prio; // 0x4
+ u8 volume; // 0x5
+ s16 extFader; // 0x6
+
+ u8 tracks[SND_TRACK_COUNT_PER_PLAYER]; // 0x8
+
+ u16 tempo; // 0x18
+ u16 tempoRatio; // 0x1A
+ u16 tempoCounter; // 0x1C
+ u8 unk_1E[2]; // 0x1E
+
+ struct SNDBankData *bank; // 0x20
+}; // size = 0x24
+
+#define SND_TRACK_MAX_CALL 3
+
+struct SNDBankData;
+
+struct SNDTrack {
+ struct {
+ u8 active : 1;
+ u8 noteWait : 1;
+ u8 muted : 1;
+ u8 tie : 1;
+ u8 noteFinishWait : 1;
+ u8 portamento : 1;
+ u8 cmp : 1; // ???
+ u8 channelMask : 1;
+ } flags; // 0x00
+
+ u8 panRange; // 0x01
+ u16 program; // 0x02
+
+ u8 volume; // 0x04
+ u8 expression; // 0x05
+ s8 pitchBend; // 0x06
+ u8 bendRange; // 0x07
+
+ s8 pan; // 0x08
+ s8 extPan; // 0x09
+ s16 extFader; // 0x0A
+ s16 extPitch; // 0x0C
+ u8 envAttack; // 0x0E
+ u8 envDecay; // 0x0F
+ u8 envSustain; // 0x10
+ u8 envRelease; // 0x11
+ u8 priority; // 0x12
+ s8 transpose; // 0x13
+
+ u8 portamentoKey; // 0x14
+ u8 portamentoTime; // 0x15
+ s16 sweepPitch; // 0x16
+
+ struct SNDLfoParam mod; // 0x18
+ u16 channelMask; // 0x1E
+
+ s32 wait; // 0x20
+
+ const u8 *trackDataStart; // 0x24
+ const u8 *trackDataPos; // 0x28
+ const u8 *posCallStack[SND_TRACK_MAX_CALL]; // 0x34
+ u8 loopCount[SND_TRACK_MAX_CALL]; // 0x38
+ u8 callStackDepth; // 0x3B
+
+ struct SNDExChannel *channelLLHead; // 0x3C
+}; // size = 0x40
+
+
+
+#endif // GUARD_SND_MAIN_H
diff --git a/arm9/lib/include/SND_util.h b/arm9/lib/include/SND_util.h
new file mode 100644
index 00000000..4137459a
--- /dev/null
+++ b/arm9/lib/include/SND_util.h
@@ -0,0 +1,14 @@
+#ifndef GUARD_SND_UTIL_H
+#define GUARD_SND_UTIL_H
+
+#include "global.h"
+
+void SND_CalcTimer(void);
+u16 SND_CalcChannelVolume(s32 x);
+
+extern const s16 SNDi_DecibelTable[0x80];
+
+// not used in pokediamond
+//extern const s16 SNDi_DecibelSquareTable[0x80];
+
+#endif // GUARD_SND_UTIL_H
diff --git a/arm9/lib/include/SND_work.h b/arm9/lib/include/SND_work.h
new file mode 100644
index 00000000..dec2bd71
--- /dev/null
+++ b/arm9/lib/include/SND_work.h
@@ -0,0 +1,92 @@
+#ifndef GUARD_SND_WORK_H
+#define GUARD_SND_WORK_H
+
+#include "global.h"
+
+#include "SND_main.h"
+#include "SND_alarm.h"
+
+#define SND_PLAYER_COUNT 16
+#define SND_CHANNEL_COUNT 16
+#define SND_TRACK_COUNT 32
+
+struct SNDWork {
+ struct SNDExChannel channels[SND_CHANNEL_COUNT]; // 0x00
+ struct SNDPlayer players[SND_PLAYER_COUNT]; // 0x540
+ struct SNDTrack tracks[SND_TRACK_COUNT]; // 0x780
+ struct SNDAlarm alarms[SND_ALARM_COUNT]; // 0xF80
+}; // size = 0x1180
+
+struct SNDSharedWork {
+ u32 finishedCommandTag; // 0x0
+ u32 playerStatus; // 0x4
+ u16 channelStatus; // 0x8
+ u16 captureStatus; // 0xA
+ u8 unk_C[0x14]; // 0xC
+ struct {
+ s16 localVars[16]; // local 0x0
+ u32 tickCounter; // local 0x20
+ } players[SND_PLAYER_COUNT]; // 0x20
+ s16 globalVars[16]; // 0x260
+}; // size = 0x280
+
+struct SNDDriverInfo {
+ struct SNDWork work; // 0x0000
+ u32 channelControls[SND_CHANNEL_COUNT]; // 0x1180
+ struct SNDWork *workPtr; // 0x11C0
+ u32 lockedChannels; // 0x11C4
+ u8 unk_XXX[24]; // 0x11C8
+}; // size = 0x11E0
+
+struct SNDChannelInfo {
+ struct {
+ BOOL active : 1;
+ BOOL locked: 1;
+ } flags; // 0x0
+ u16 volume; // 0x4
+ u8 pan; // 0x6
+ u8 unk_7; // 0x7
+ s32 envStatus; // 0x8
+}; // size = 0xC
+
+struct SNDPlayerInfo {
+ struct {
+ BOOL active : 1;
+ BOOL paused : 1;
+ } flags; // 0x0
+ u16 trackBitMask; // 0x4
+ u16 tempo; // 0x6
+ u8 volume; // 0x8
+ u8 unk_9[3]; // 0x9
+}; // size = 0xC
+
+struct SNDTrackInfo {
+ u16 program; // 0x0
+ u8 volume; // 0x2
+ u8 expression; // 0x3
+
+ s8 pitchBend; // 0x4
+ u8 bendRange; // 0x5
+ u8 pan; // 0x6
+ s8 transpose; // 0x7
+
+ u8 unk_8; // 0x8
+ u8 chnCount; // 0x9
+ u8 channel[SND_CHANNEL_COUNT]; // 0xA
+}; // size = 0x1A
+
+u32 SND_GetPlayerStatus(void);
+u16 SND_GetChannelStatus(void);
+//u16 SND_GetCaptureStatus(void);
+u32 SND_GetPlayerTickCounter(u32 playerId);
+//s16 SND_GetPlayerLocalVariable(u32 playerId, u32 var);
+//s16 SND_GetPlayerGlobalVariable(u32 var);
+//BOOL SND_ReadChannelInfo(const SNDDriverInfo *driverInfo, s32 chnId, SNDChannelInfo *chnInfo);
+//BOOL SND_ReadPlayerInfo(const SNDDriverInfo *driverInfo, s32 playerId, s32 trackId, SNDPlayerInfo *playerInfo);
+//BOOL SND_ReadTrackInfo(const SNDDriverInfo *driverInfo s32 playerId, s32 trackId, SNDTrackInfo *trackInfo);
+u32 SNDi_GetFinishedCommandTag(void);
+void SNDi_InitSharedWork(struct SNDSharedWork *sw);
+
+extern struct SNDSharedWork *SNDi_SharedWork;
+
+#endif // GUARD_SND_WORK_H