Sound::GetListenerPosition
function · sound · host
- Address
0x7a5f50· 77 bytes, up to0x7a5f9c- Meaning
- Reads the listener position back from FMOD in world axes
- Confidence
- verified, proof one
- Finding
- sound/engine#positions-and-the-listener
- Test
sound::env_sound_audible,sound::first_slot_farther_than_query,sound::listener_get_attrs,sound::max_distance_cull,sound::sound_audible_distance
Finding: Positions and the listener in sound: the engine
The engine maps a world vector (x, y, z) to FMOD as (−y, z, x). Sound::SetPosition(pos, vel)
stores both for a 3D sound and, with a live channel, calls FSOUND_3D_SetAttributes(ch, pos, vel or NULL). 0x7a5eb0(pos, vel, forward, up) calls FSOUND_3D_Listener_SetAttributes with all four
mapped and a null velocity passed as NULL; 0x7a5f50 reads the listener position back as (z, −x, y)
of FMOD's. 0x7a5e80(min, max) sets FSOUND_Sample_SetMinMaxDistance on the stream's sample for a
3D sound, 0x7a5e40 the frequency, 0x7a5bf0(props) FSOUND_Reverb_SetChannelProperties for a
3D sound with a channel and non-null properties, and 0x7a5fa0(props) FSOUND_Reverb_SetProperties.
The derivation is in the doc.
Callers 5
- PlayFootstep sound
- IsWithinListenerDistance sound
- EmitterPump sound
- FindFartherEmitterSlot sound
- Sound::SetCutoffDistanceSquared sound
Callees 1
- _FSOUND_3D_Listener_GetAttributes@32 unassigned
Calls and jumps by a bare address, from tables/calls.tsv.