fable_format/met/
mod.rs

1mod decode;
2mod encode;
3
4/// Audio metadata (?)
5///
6/// From fabletlcmod.com
7///
8/// ```txt
9/// .Met
10///
11/// Only documenting .Met files as they control .lug audio banks.
12/// .Met are usually 2 sections (Audio Information, Environment Settings) Ingame.Met contains a third section that links // audio to compiled events.
13/// Header
14///
15/// [4] Bytes - Always (01 00 00 00)
16/// [4] Bytes - Number of Files
17/// [4] Bytes - Unknown
18/// Audio Information Listing
19///
20/// [4] Bytes - Entry Number
21/// [4] Bytes - ID
22/// [4] Bytes - Import Directory File Name Length (String Size)
23/// ~ String
24/// [4] Bytes - Audio File Size (Does not have header like .Lut audio files)
25/// [4] Bytes - Offset
26/// [2] Bytes - Number of Channels
27/// [2] Bytes - Audio Codec (105 = Xb-Adpcm, 1 = PCM) Only two used.
28/// [4] Bytes - Frequency
29/// [8] Bytes - Event ID, mostly unused
30/// Environment Audio Listing
31///
32/// Few pieces are unknown! (Hard to test some of these)
33/// Header for Environment Audio
34///
35/// [4] Bytes - Number of Files
36/// Audio Listing Loop
37///
38/// 48 Bytes per listing. Loop until file number is met.
39///
40/// [4] Bytes - File Counter
41/// [4] Bytes - File ID
42/// [4] Bytes - String Size for Group Listing (If zero, then string does not exist)
43/// ~ String (If it exists)
44/// [2] Bytes - Event Identifier (01 = Day Sound, 02 = Night Sound, 00 = Should be anytime)
45/// [2] Bytes - Unknown
46/// [4] Bytes - Number of Loops (Usually either 1 or 9999)
47/// [4] Bytes - Unknown (relative to number of loops, should be memory allocation)
48/// [4] Bytes - Unknown (usually nothing)
49/// [2] Bytes - Unknown (relative to sound volume. Should be either initial gain or user gain.)
50/// [2] Bytes - Unknown (relative to sound volume. Should be either initial gain or user gain.)
51/// [2] Bytes - Unknown (3D volume or Head Relative)
52/// [2] Bytes - Unknown (2D volume?)
53/// [4] Bytes - Location to Play sound (X) {Float}
54/// [4] Bytes - Location to Play sound (Y) {Float}
55/// [4] Bytes - Priority
56///
57/// *Upon Last Entry after this loop. If the 4 bytes has value, push to next section.
58/// Event Listings
59///
60/// Only Exists in Ingame.Met
61///
62/// [4] Bytes Number of Entries
63/// Event Loop
64///
65/// [4] Bytes - String Length
66/// ~ String (Event Name)
67/// [4] Bytes - Number of Sounds to Associate with Event Name
68/// ~Then Based on number of sounds to associate are 4 byte ID listings
69/// ```
70
71pub struct Met {
72}