mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
5b99929394
Supports most of the grain types now while maintaining compatibility with the old stuff (at least the subset of things jak1 uses) Would benefit from some testing in Jak 1 to make sure I didn't break anything. Sorry the git history is a mess, I'll do something about it later.
77 lines
2.8 KiB
C++
77 lines
2.8 KiB
C++
#ifndef SNDSHIM_H_
|
|
#define SNDSHIM_H_
|
|
#pragma once
|
|
#include "common/common_types.h"
|
|
|
|
constexpr int SND_CORE_0 = 1;
|
|
constexpr int SND_CORE_1 = 2;
|
|
constexpr int SD_REV_MODE_OFF = 0;
|
|
|
|
struct SFXUserData {
|
|
u32 data[4];
|
|
};
|
|
|
|
typedef void* (*AllocFun)();
|
|
typedef void (*FreeFun)(void*);
|
|
|
|
void snd_StartSoundSystem();
|
|
void snd_StopSoundSystem();
|
|
s32 snd_GetTick();
|
|
void snd_RegisterIOPMemAllocator(AllocFun alloc, FreeFun free);
|
|
int snd_LockVoiceAllocator(bool block);
|
|
void snd_UnlockVoiceAllocator();
|
|
s32 snd_ExternVoiceAlloc(s32 vol_group, s32 priority);
|
|
u32 snd_SRAMMalloc(u32 size);
|
|
void snd_SetMixerMode(s32 channel_mode, s32 reverb_mode);
|
|
void snd_SetGroupVoiceRange(s32 group, s32 min, s32 max);
|
|
void snd_SetReverbDepth(s32 core, s32 left, s32 right);
|
|
void snd_SetReverbType(s32 core, s32 type);
|
|
void snd_SetPanTable(s16* table);
|
|
void snd_SetPlayBackMode(s32 mode);
|
|
s32 snd_SoundIsStillPlaying(s32 sound_handle);
|
|
void snd_StopSound(s32 sound_handle);
|
|
void snd_SetSoundVolPan(s32 sound_handle, s32 vol, s32 pan);
|
|
void snd_SetMasterVolume(s32 which, s32 volume);
|
|
void snd_UnloadBank(s32 bank_handle);
|
|
void snd_ResolveBankXREFS();
|
|
void snd_ContinueAllSoundsInGroup(u8 groups);
|
|
void snd_PauseAllSoundsInGroup(u8 groups);
|
|
void snd_SetMIDIRegister(s32 handle, u8 reg, u8 value);
|
|
void snd_SetGlobalExcite(u8 value);
|
|
|
|
s32 snd_PlaySoundVolPanPMPB(s32 bank_handle,
|
|
s32 sound_id,
|
|
s32 vol,
|
|
s32 pan,
|
|
s32 pitch_mod,
|
|
s32 pitch_bend);
|
|
|
|
s32 snd_PlaySoundByNameVolPanPMPB(s32 bank_handle,
|
|
char* bank_name,
|
|
char* sound_name,
|
|
s32 vol,
|
|
s32 pan,
|
|
s32 pitch_mod,
|
|
s32 pitch_bend);
|
|
|
|
void snd_SetSoundPitchModifier(s32 sound_handle, s32 pitch_mod);
|
|
void snd_SetSoundPitchBend(s32 sound_handle, s32 pitch_bend);
|
|
void snd_PauseSound(s32 sound_handle);
|
|
void snd_ContinueSound(s32 sound_handle);
|
|
void snd_AutoPitch(s32 sound_handle, s32 pitch, s32 delta_time, s32 delta_from);
|
|
void snd_AutoPitchBend(s32 sound_handle, s32 bend, s32 delta_time, s32 delta_from);
|
|
s32 snd_BankLoadEx(const char* filepath, s32 data_offset, u32 spu_mem_loc, u32 spu_mem_size);
|
|
s32 snd_GetVoiceStatus(s32 voice);
|
|
s32 snd_GetFreeSPUDMA();
|
|
void snd_FreeSPUDMA(s32 channel);
|
|
void snd_keyOnVoiceRaw(u32 core, u32 voice);
|
|
void snd_keyOffVoiceRaw(u32 core, u32 voice);
|
|
s32 snd_GetSoundUserData(s32 block_handle,
|
|
char* block_name,
|
|
s32 sound_id,
|
|
char* sound_name,
|
|
SFXUserData* dst);
|
|
void snd_SetSoundReg(s32 sound_handle, s32 which, u8 val);
|
|
|
|
#endif // SNDSHIM_H_
|