The .EAR file format

The .EAR file defines the configuration of sound sources, listeners, surfaces and settings as it is defined in the modelling application. It is a little-endian binary file, designed to eventually make embedding binary data easy, for example audio streams. The lay-out of the file is based on a sequence of blocks with a 4 byte header and block length that contain a number of positional arguments. The arguments that are defined depend on the type of block. Each argument is again prefixed with a 4 byte type identifier. Strings are null-terminated and padded to fall between 4 byte alignment boundaries. All other types are a multitude of 4 bytes by nature.

Header

.0x2eE0x45A0x41R0x52V0x56R0x52S0x53N0x4ei0x69n0x6et0x7440x340x000x000x000x00
The file starts with a header and a version to identify the file. As of writing the version is always 0 (0x00 0x00 0x00 0x00).

Settings block

S0x53E0x45T0x540x20length (UINT)0xXX 0xXX 0xXX 0xXX
Several settings can be listed in the file that define the behaviour of the rendering application.

• Debug

• Air absorption

s0x73t0x74r0x720x20a0x61b0x62s0x73o0x6fr0x72p0x70t0x74i0x69o0x6fn0x6e0x000x00v0x76e0x65c0x6330x33f0x66l0x6ct0x7440x34alow (FLOAT)0xXX 0xXX 0xXX 0xXXf0x66l0x6ct0x7440x34amid (FLOAT)0xXX 0xXX 0xXX 0xXXf0x66l0x6ct0x7440x34ahigh (FLOAT)0xXX 0xXX 0xXX 0xXX
The air absorption for the external medium of the scene specified as three floating point numbers for the three frequency ranges

• Dry sound level

s0x73t0x74r0x720x20d0x64r0x72y0x79l0x6ce0x65v0x76e0x65l0x6c0x000x000x000x00f0x66l0x6ct0x7440x34drylevel (FLOAT)0xXX 0xXX 0xXX 0xXX
A debugging parameter to define to what extent direct sound is mixed in the final result

• Debug directory

• Center frequencies

s0x73t0x74r0x720x20f0x66r0x72e0x65q0x710x000x000x000x00v0x76e0x65c0x6330x33f0x66l0x6ct0x7440x34low (FLOAT)0xXX 0xXX 0xXX 0xXXf0x66l0x6ct0x7440x34mid (FLOAT)0xXX 0xXX 0xXX 0xXXf0x66l0x6ct0x7440x34high (FLOAT)0xXX 0xXX 0xXX 0xXX
The center frequencies of the three frequency ranges. This parameter is used by the equalizer algorithm to split audio files into three frequency ranges.

Listener block

As of writing there are two kinds of listeners:

• An omni-directional mono listener that captures sounds equally from every direction

O0x4fU0x55T0x5410x31length (UINT)0xXX 0xXX 0xXX 0xXXs0x73t0x74r0x720x20path (STR)0xXX 0xXX 0xXX 0xXX... (STR)0xXX 0xXX 0xXX 0xXX
What follows is the positioning of the listener, which can either be static or animated.

• A stereo listener that also has an orientation apart from a location

O0x4fU0x55T0x5420x32length (UINT)0xXX 0xXX 0xXX 0xXXs0x73t0x74r0x720x20path (STR)0xXX 0xXX 0xXX 0xXX... (STR)0xXX 0xXX 0xXX 0xXX
What follows is two times either an anim block or a vec3 block. The first block determines the positioning of the listener in a similar fashion as with the mono listener. The second block defines a vector that defines the orientation of the right ear of the listener. The definition the right ear is the same as that of the positioning, but the right ear is defined using (a sequence of) normalized directional vectors rather than Cartesian coordinates.

Sound source block

As of writing there are two kinds of listeners:

• A single sound file source

S0x53S0x53R0x52C0x43length (UINT)0xXX 0xXX 0xXX 0xXXf0x66l0x6ct0x7440x34gain (FLOAT)0xXX 0xXX 0xXX 0xXXs0x73t0x74r0x720x20path (STR)0xXX 0xXX 0xXX 0xXX... (STR)0xXX 0xXX 0xXX 0xXX
An equalizer algorithm will be used to separate the sound file into the three frequency ranges, using the center frequencies as defined in the Settings block.