OBD:OSBD/OSAm

From OniGalore
< OBD:OSBD(Redirected from OSAm)

Osb r am.gif


Offset Type Raw Hex Value Description
0x00 tag 6D 41 53 4F OSAm Oni Sound Ambient
0x04 uint32 C8 00 00 00 200 200 bytes; size of the part that follows
0x08 uint32 06 00 00 00 6 version (see below)
0x0c uint32 01 00 00 00 normal priority of the group; the following priorities are possible (values in dec):
0 - low
1 - normal
2 - high
3 - highest
0x10 bitset 04 00 00 00 4 sound options:
1 - interrupt tracks on stop
2 - play only once
4 - can pan
0x14 float 00 00 20 41 10.000000 detail sound sphere radius
0x18 float 00 00 80 3F 1.000000 minimum elapsed time in seconds between detail sounds playing
0x1c float 00 00 80 3F 1.000000 maximum elapsed time in seconds between detail sounds playing
0x20 float 00 00 20 41 10.000000 distance at which the maximum volume is heard
0x24 float 00 00 48 42 50.000000 distance at which the minimum volume is heard
0x28 char[32] 00... not used detail track name (reference to a .grp file)
0x48 char[32] 61 69 72... aircon5lp base track 1 name (reference to OSBDaircon5lp.grp)
0x68 char[32] 00... not used base track 2 name (reference to a .grp file)
0x88 char[32] 00... not used in sound name (reference to a .grp file)
0xa8 char[32] 00... not used out sound name (reference to a .grp file)
0xc8 uint32 03 00 00 00 3 "threshold": maximum number of this ambient which can be playing at a time (present in version 5 and above, default is 3)
0xcc float 00 00 00 00 0.000000 minimum occlusion percentage; if 1, always plays at full volume, otherwise calculates volume by amount of environmental occlusion (present in version 6, default is 0.0)


Detail track
The detail track is some sound or sounds that can play at random intervals over top of the ambient sound. An example would be OSBDAiportMonitors.amb, which references OSBDnormcompdetail.grp as the detail track. OSBDnormcompdetail.grp in turn lists 34 different beep sounds that can be used.
Version
There have been several versions of the binary format for OSBD subtypes. Later versions have added fields; since the lower versions lack those fields, the other content must have its addresses shifted backwards accordingly when reading it.
The above example belongs to the latest OSAm version encountered in Oni: 6.
Versions of OSAm occurring in Oni are 1, 4, 5 and 6. Version 1 is identical to version 4.
The three OSBD subtypes all use the same version number. When one subtype had a field added, it increased the version number for all three OSBD subtypes. This is why they all end at version 6, why two different versions of a specific subtype might have identical layouts, and why some numbers will be skipped altogether for a given subtype as we see with OSAm and OSIm.


Dialog from level0_Tools

Tool dialog - Ambient Sound Properties.png