Sound
struct · sound · 144 bytes
- Meaning
- Holds a playing stream: six list links, channel, stream, flags, fade, position, GUID, volume, bus and pauses
- Confidence
- verified, proof one
- Finding
- sound/engine#the-sound-object
Finding: The sound object in sound: the engine
A Sound is a 0x90-byte record from a pool of 40-record blocks. It holds six list links (+0x00
every sound, +0x08 fades, +0x10 objects that move, +0x18 panning, +0x20 distance cutoff,
+0x28 ended), the FMOD channel (+0x30, −1 when none) and stream (+0x34), the flags (+0x38),
the fade state (+0x40 start, +0x44 level, +0x48 rate per ms), the position (+0x50) and
velocity (+0x5c), the object GUID it follows (+0x68), the cutoff distance (+0x70), the volume
(+0x74, 1.0), the distance gain (+0x78, 1.0), the frequency (+0x7c, 22050), the name hash
(+0x80), the bus (+0x84) and the pause reasons (+0x88).
The derivation is in the doc.
Fields 22
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 8 | void *[2] | m_allLink | Holds the link on the every-sound list | verified, proof one | sound/engine#the-sound-object |
0x0008 | 8 | void *[2] | m_fadeLink | Holds the link on the fade list | verified, proof one | sound/engine#the-sound-object |
0x0010 | 8 | void *[2] | m_objectLink | Holds the link on the list of sounds that follow objects | verified, proof one | sound/engine#the-sound-object |
0x0018 | 8 | void *[2] | m_panLink | Holds the link on the panning list | verified, proof one | sound/engine#the-sound-object |
0x0020 | 8 | void *[2] | m_cutoffLink | Holds the link on the distance cutoff list | verified, proof one | sound/engine#the-sound-object |
0x0028 | 8 | void *[2] | m_endedLink | Holds the link on the ended list | verified, proof one | sound/engine#the-sound-object |
0x0030 | 4 | int32_t | m_channel | Holds the FMOD channel, -1 when none | verified, proof one | sound/engine#the-sound-object |
0x0034 | 4 | void * | m_stream | Holds the FMOD stream | verified, proof one | sound/engine#the-sound-object |
0x0038 | 4 | uint32_t | m_flags | Holds the caller's flags in the low byte and the engine's state bits above | verified, proof one | sound/engine#the-sound-object |
0x0040 | 4 | uint32_t | m_fadeStart | Holds the fade start time in milliseconds | verified, proof one | sound/engine#the-sound-object |
0x0044 | 4 | int32_t | m_fadeLevel | Holds the fade target or start level, 0 to 255 | verified, proof one | sound/engine#the-sound-object |
0x0048 | 4 | float | m_fadeRate | Holds the fade rate in levels per millisecond, below 0 for a fade out | verified, proof one | sound/engine#the-sound-object |
0x0050 | 12 | float[3] | m_position | Holds the position in world axes | verified, proof one | sound/engine#the-sound-object |
0x005c | 12 | float[3] | m_velocity | Holds the velocity in world axes | verified, proof one | sound/engine#the-sound-object |
0x0068 | 8 | uint64_t | m_guid | Holds the GUID of the object the sound follows | verified, proof one | sound/engine#the-sound-object |
0x0070 | 4 | float | m_cutoff | Holds the cutoff distance, 0 for none | verified, proof one | sound/engine#the-sound-object |
0x0074 | 4 | float | m_volume | Holds the volume, 1.0 by default | verified, proof one | sound/engine#the-sound-object |
0x0078 | 4 | float | m_distanceGain | Holds the distance gain, 1.0 by default | verified, proof one | sound/engine#the-sound-object |
0x007c | 4 | uint32_t | m_frequency | Holds the frequency, 22050 by default | verified, proof one | sound/engine#the-sound-object |
0x0080 | 4 | uint32_t | m_nameHash | Holds the file name's SStrHash, -1 by default | verified, proof one | sound/engine#the-sound-object |
0x0084 | 4 | uint32_t | m_bus | Holds the bus the sound opened on | verified, proof one | sound/engine#the-sound-object |
0x0088 | 4 | uint32_t | m_pauseReasons | Holds the four pause reason bits | verified, proof one | sound/engine#the-sound-object |