soundmetadata.bin
Binary AudioKinetic metadata file. This file is present in DOOM Eternal and DOOM: The Dark Ages. However, their contents are very different (despite maintaining the same basic chunking structure)
The following is the file format for Dark Ages
// All values are Little-Endian
template<typename TYPE>
struct list_t {
uint32_t num;
TYPE* data;
}
struct string_t {
uint32_t length;
char* data; // Not null-terminated
}
// Case-insensitive (to lowercase) FNV hash
typedef uint32_t hash_t;
struct NameHash {
string_t name;
hash_t hash; // Hash of the above string
}
// This file loves to flip-flop between putting
// a string after it's hash, or before it's hash
struct HashName {
hash_t hash; // Hash of the following string
string_t name;
}
struct SoundEvent {
NameHash name;
uint8_t languageID; // 0 corresponds with "SFX" and 1 with "ENGLISH(US)"
string_t languageString;
}
// Sections 4 and 5 of the soundmetadata have
// the exact same format. Hence we can reuse
// the same structure definitions for convenience
struct Section_4_5_Item {
HashName name;
list_t<HashName> stringlist;
}
struct SampleList_PlaybackTimes {
string_t languageString;
float playbackTime; // Playback time of the sample in seconds
}
struct SampleList_Sample {
uint32_t sampleID;
string_t languageString; // Language name, NOT the hashed string corresponding to the sampleID
}
// Can be used to identify which audio samples are used
// in which soundbanks
struct SampleList {
NameHash name; // Name of a soundbank
uint8_t byte; // Always 0
uint32_t word; // Unknown
uint8_t flag0; // 0 or 1
uint8_t flag1; // 0 or 1
uint32_t word2; // Unknown
// IMPORTANT: This list (including it's length field)
// is present ONLY IF flag0 == 0
// Only present in non-SFX sample lists
list_t<SampleList_PlaybackTimes> playbackTimes;
list_t<SampleList_Sample> samples;
}
struct SoundMetaData_DarkAges {
list_t<SoundEvent> SoundEvents;
list_t<HashName> section2; // Exact purpose unknown
list_t<NameHash> section3; // Exact purpose unknown
list_t<Section_4_5_Item> SoundSwitches;
list_t<Section_4_5_Item> SoundStates;
list_t<SampleList> SampleLists;
// See https://wiki.eternalmods.com/books/8-reverse-engineering-file-formats/page/containermask
// For an explanation of this structure.
sndContainerMask ContainerMask
}
No Comments