jak-project/game/overlord/sndshim.h
Ziemas 766b328c97
Overlord sound player (#1239)
* Accept player RPC commands in overlord

* Remove the .projectile file

I use emacs for everything so I don't want it to only look at the goal code.

* Fill out most of the unique player structs

* Decompile most of ssound.c

* Silence some spam

* Comment out WaitSema instance

* Add a file with definitions for snd_ functions

Makes it compile without commenting them out.

Maybe it'd be nice to maintain the original API usage in overlord for
similarity and shim them to whatever API the player uses.

* Make SoundBank statically sized again.

Didn't realise this was used in an array. MSVC should be happy again.

Not sure what the actual size of these should be.

* Fix logic issue

* Finish RPC Loader

* More RPC_Player

* Play RPC command

* All the RPC commands added

* Call Music/Bank loaders

* audio: add almost all `.MUS` and `.SBK` files to build process

* Include TWEAKVAL in build output

* Load banks and music tweaks

* Comment out spam

* Sound struct unk -> is music

* Also test if empty1.sbk was found

For the sake of tests.

* Get rid of PC_DEBUG_SOUND_ENABLE

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2022-03-22 18:53:36 -04:00

41 lines
1.3 KiB
C

#ifndef SNDSHIM_H_
#define SNDSHIM_H_
#pragma once
#include "common/common_types.h"
typedef void* (*AllocFun)();
typedef void (*FreeFun)(void*);
void snd_StartSoundSystem();
void snd_StopSoundSystem();
void snd_RegisterIOPMemAllocator(AllocFun, FreeFun);
void snd_LockVoiceAllocator(s32);
void snd_UnlockVoiceAllocator();
s32 snd_ExternVoiceVoiceAlloc(s32, s32);
u32 snd_SRAMMalloc(u32);
void snd_SetMixerMode(s32, s32);
void snd_SetGroupVoiceRange(s32, s32, s32);
void snd_SetReverbDepth(s32, s32, s32);
void snd_SetReverbType(s32, s32);
void snd_SetPanTable(s16*);
void snd_SetPlayBackMode(s32);
s32 snd_SoundIsStillPlaying(s32);
void snd_StopSound(s32);
void snd_SetSoundVolPan(s32, s32, s32);
void snd_SetMasterVolume(s32, s32);
void snd_UnloadBank(s32);
void snd_ResolveBankXREFS();
void snd_ContinueAllSoundsInGroup(u8);
void snd_PauseAllSoundsInGroup(u8);
void snd_SetMIDIRegister(s32, u8, u8);
s32 snd_PlaySoundVolPanPMPB(s32, s32, s32, s32, s32, s32);
void snd_SetSoundPitchModifier(s32, s32);
void snd_SetSoundPitchBend(s32, s32);
void snd_PauseSound(s32);
void snd_ContinueSound(s32);
void snd_AutoPitch(s32, s32, s32, s32);
void snd_AutoPitchBend(s32, s32, s32, s32);
s32 snd_BankLoadEx(const char* filepath, s32 data_offset, s32 unk1, s32 unk2);
#endif // SNDSHIM_H_