0x4DFB10 CAEBankLoader *__thiscall CAEBankLoader::CAEBankLoader(CAEBankLoader *) 0x4DFB20 void __thiscall CAEBankLoader::~CAEBankLoader(CAEBankLoader *this) 0x4DFB60 void __thiscall CAEBankLoader::InitialiseRequestList(CAEBankLoader *this) 0x4DFBA0 void __thiscall CAEBankLoader::CalculateBufferSize(CAEBankLoader *this) 0x4DFBD0 char __thiscall CAEBankLoader::LoadBankLookupFile(CAEBankLoader *this) 0x4DFC70 char __thiscall CAEBankLoader::LoadSFXPakLookupFile(CAEBankLoader *this) 0x4DFDE0 void *__thiscall CAEBankLoader::GetSoundBuffer2(CAEBankLoader *this, unsigned short bankslot, int *out_size) 0x4DFE30 void __thiscall CAEBankLoader::Service(CAEBankLoader *this) 0x4E01B0 CAEBankLookupItem *__thiscall CAEBankLoader::GetBankLookup(CAEBankLoader *this, unsigned short bank) 0x4E01E0 long double __thiscall CAEBankLoader::GetSoundHeadroom(CAEBankLoader *this, unsigned short sound, short bankslot) 0x4E0220 char __thiscall CAEBankLoader::IsSoundBankLoaded(CAEBankLoader *this, unsigned short bank, short bankslot) 0x4E0250 char __thiscall CAEBankLoader::GetSoundBankLoadingStatus(CAEBankLoader *this, unsigned short bank, short bankslot) 0x4E0280 void *__thiscall CAEBankLoader::GetSoundBuffer(CAEBankLoader *this, unsigned short sound, short bankslot, int *out_Size, short *out_SampleRate) 0x4E0380 int __thiscall CAEBankLoader::GetLoopOffset(CAEBankLoader *this, unsigned short sound, short bankslot) 0x4E03B0 char __thiscall CAEBankLoader::IsSoundLoaded(CAEBankLoader *this, unsigned short bank, unsigned short sound, short bankslot) 0x4E0400 char __thiscall CAEBankLoader::GetSoundLoadingStatus(CAEBankLoader *this, unsigned short bank, unsigned short sound, short bankslot) 0x4E0450 void __thiscall CAEBankLoader::UpdateVirtualChannels(CAEBankLoader *this, void *a2, void *a3, void *a4) 0x4E0590 char __thiscall CAEBankLoader::LoadBankSlotFile(CAEBankLoader *this) 0x4E0670 void __thiscall CAEBankLoader::LoadSoundBank(CAEBankLoader *this, unsigned short bank, short bankslot) 0x4E07A0 void __thiscall CAEBankLoader::LoadSound(CAEBankLoader *this, unsigned short bank, unsigned short sound, short bankslot) 0x4E08F0 char __thiscall CAEBankLoader::Initialise(CAEBankLoader *this) 0x5B97F0 void __cdecl CAEAudioUtility::StaticInitialise() 0x4D9C10 int __cdecl CAEAudioUtility::GetRandomNumberInRange(int, int) 0x4D9C50 double __cdecl CAEAudioUtility::GetRandomNumberInRangef(float, float) 0x4D9C80 char __cdecl CAEAudioUtility::ResolveProbability(float) 0x4D9CC0 char __cdecl CAEAudioUtility::GetBankAndSoundFromScriptSlotAudioEvent(int *a1, int *pBank, int *pSound, int scriptSlot) 0x4D9D90 double __cdecl CAEAudioUtility::GetPiecewiseLinear(float a1, short a2, float *a3) 0x4D9E10 CVehicle *__cdecl CAEAudioUtility::FindVehicleOfPlayer() 0x4D9E50 double __cdecl CAEAudioUtility::AudioLog10(float) 0x4D9E80 int __cdecl CAEAudioUtility::GetCurrentTimeInMilliseconds() 0x4D9EF0 int __cdecl CAEAudioUtility::ConvertFromBytesToMS(unsigned int size, unsigned int sampleRate, unsigned short numChannels) 0x4D9F40 int __cdecl CAEAudioUtility::ConvertFromMSToBytes(unsigned int MS, unsigned int sampleRate, unsigned short numChannels)
#pragma pack(push, 1) struct CAEBankSlotItem { int m_dwOffset; int m_dwLoopOffset; short m_usSampleRate; short m_usSoundHeadroom; }; #pragma pack(pop) #pragma pack(push, 1) struct CAEBankLookupItem { char m_iPak; char _pad[3]; int m_dwOffset; int m_dwSize; }; #pragma pack(pop) #pragma pack(push, 1) struct CAEBankSlot { int m_dwOffsetOnBuffer; int m_dwSlotBufferSize; int _unknown1; int _unknown2; unsigned short m_usBankNum; unsigned short m_nSoundsOnBank; CAEBankSlotItem m_aBankItems[400]; }; #pragma pack(pop) #pragma pack(push, 1) struct CAESoundRequest { CAEBankSlot *m_pBankSlot; int m_dwOffset; int m_dwSize; void *m_pBufferData; // Somewhere in the m_pBuffer, used to resolve sector alignment issues void *m_pBuffer; // Pointer returned by malloc int m_iLoadingStatus; short m_usBank; short m_usBankSlot; short m_usSound; char m_iPak; char field_1F; }; #pragma pack(pop) #pragma pack(push, 1) struct CAEBankLoader { CAEBankSlot *m_pBankSlots; CAEBankLookupItem *m_pBankLookup; void *m_pPakFiles; short m_usNumBankSlots; short m_usNumBanks; short m_usNumPakFiles; short _unused0; char m_bInitialized; char gap_15[3]; int m_iSoundBuffersSize; char *m_pSoundBuffers; int *m_StreamHandles; CAESoundRequest m_aSoundRequests[50]; short _unk0; short m_nRequestsToLoad; short m_iRequestListNext; short m_iStreamingChannel; short m_aBankSlotSound[45]; char _unused1[30]; }; #pragma pack(pop)
enum eBankSlot : short { BANKSLOT_FRONTEND_GAME = 0, BANKSLOT_FRONTEND_MENU = 1, BANKSLOT_COLLISIONS = 2, BANKSLOT_BULLET_SOUNDS = 3, BANKSLOT_EXPLOSIONS = 4, BANKSLOT_WEAPONS = 5, BANKSLOT_WEATHER_RAIN = 6, BANKSLOT_STREAM_ENGINE_1 = 7, BANKSLOT_STREAM_ENGINE_2 = 8, BANKSLOT_STREAM_ENGINE_3 = 9, BANKSLOT_STREAM_ENGINE_4 = 10, BANKSLOT_STREAM_ENGINE_5 = 11, BANKSLOT_STREAM_ENGINE_6 = 12, BANKSLOT_STREAM_ENGINE_7 = 13, BANKSLOT_STREAM_ENGINE_8 = 14, BANKSLOT_STREAM_ENGINE_9 = 15, BANKSLOT_STREAM_ENGINE_10 = 16, BANKSLOT_HORNS = 17, BANKSLOT_HELICOPTER = 18, BANKSLOT_VEHICLE_EXTRAS = 19, BANKSLOT_SPEECH_0 = 20, BANKSLOT_SPEECH_1 = 21, BANKSLOT_SPEECH_2 = 22, BANKSLOT_SPEECH_3 = 23, BANKSLOT_SPEECH_4 = 24, BANKSLOT_PLAYER_SPEECH = 25, BANKSLOT_SCRIPT_SPEECH_0 = 26, BANKSLOT_SCRIPT_SPEECH_1 = 27, BANKSLOT_SCRIPT_SPEECH_2 = 28, BANKSLOT_SCRIPT_SPEECH_3 = 29, BANKSLOT_AMBIENT_RESIDENT = 30, BANKSLOT_DOORS = 31, BANKSLOT_WATER = 32, BANKSLOT_33 = 33, BANKSLOT_34 = 34, BANKSLOT_35 = 35, BANKSLOT_36 = 36, BANKSLOT_37 = 37, BANKSLOT_38 = 38, BANKSLOT_39 = 39, BANKSLOT_ENGINE_RESIDENT = 40, BANKSLOT_FEET_RESIDENT = 41, BANKSLOT_BULLET_TRAIL = 42, BANKSLOT_43 = 43, BANKSLOT_44 = 44 };
Thanks to Silent for the enum above
Bonus Documentation for SFX files:
SFXPak: http://pastebin.com/NAVwtmyb
BankLkup: http://pastebin.com/drKr6YCP
BankSlot: http://pastebin.com/nM6Ztem1
EventVol: http://pastebin.com/ffQCPE5S
and finally, the most obvious file... including it here just to have a complete documentation
PakFiles: http://pastebin.com/zBrdUpAW
Oh well, I guess the deadline for the audio engine was too short considering the mess it is