Skip to content

Instantly share code, notes, and snippets.

@Radfordhound
Last active May 16, 2020 00:44
Show Gist options
  • Save Radfordhound/b6aef331778835ac7b98cbea58df4d22 to your computer and use it in GitHub Desktop.
Save Radfordhound/b6aef331778835ac7b98cbea58df4d22 to your computer and use it in GitHub Desktop.
// (WIP) SBK Format Spec
// By: Radfordhound
struct Header
{
char Signature[4] = "SBNK";
uint32_t Unknown1 = 0x20060700; // Probably flags
SoundBank* Bank;
Cue* Cues;
uint32_t* NormalCueIndices; // ?
char** StreamDataPaths; // ?
}
struct SoundBank
{
char Name[64];
uint32_t CueCount;
uint32_t NormalCueCount; // ?
uint32_t StreamCueCount; // ?
}
enum SoundType : uint32_t
{
SOUND_TYPE_NORMAL = 0,
SOUND_TYPE_STREAM = 1
}
enum SoundCategory : uint32_t
{
SOUND_CATEGORY_NORMAL = 0,
SOUND_CATEGORY_MUSIC = 1,
SOUND_CATEGORY_VOICE = 4
}
struct Cue
{
char Name[32];
SoundType Type;
uint32_t Index;
SoundCategory Category; // This is probably wrong?? Iirc I tested this in-game by changing the respective categories' volume levels and there was no difference.
float Unknown1; // Volume, 3d radius, or range in?
float Unknown2; // Volume, 3d radius, or range in?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment