HammeriteAudioManager

Audio. Inherits RefCounted

One map's sound: plays sounds through its audio graph, sets the reverb, and tells listeners.

Manages all acoustic propagation logic, sound playback, and audio stream management. Kept in the view's runtime data (HammeriteMap3D.get_runtime_data()) by the HammeriteAudio autoload, which makes a new one whenever the map or its variant changes; reach it with HammeriteAudio.get_manager(node) rather than holding on to one.

Responsibilities: - Sound submission API for entities - AudioStreamPlayer3D pool management (dynamic allocation) - AudioStream caching with resource names as keys - All propagation calculations (zone detection, portal finding, path queries) - Position && volume updates each frame - Reverb application based on listener position - Multi-source sound support

============================================================================== INNER CLASSES - Type-safe sound data containers ==============================================================================

What one sound is and is doing. Taken from the HammeriteAudioSoundSpec it was created from, and the manager's own from then on: the spec is read once and never held, so a caller may reuse it.

Native since 2.0 (#269): BUS_NAME is bus_name(), and its inner sound classes are HammeriteAudioManagerSoundData and the two that extend it.

Properties

TypeNameDefault
HammeriteAudioHearinghearing
HammeriteMapmap
HammeriteAudioMixSettingsmix
HammeriteAudioSoundTypessound_types

Methods

ReturnsMethod
Stringbus_name() static
voidcleanup()
voidclear_cache()
intcreate_environmental_sound(spec: HammeriteAudioSoundSpec)
intcreate_positional_sound(spec: HammeriteAudioSoundSpec)
booldelete_sound(handle: int)
voidinitialize(audio_graph: HammeriteAudioNodeGraph, map: HammeriteMap, map_3d: HammeriteMap3D)
boolis_sound_playing(handle: int) const
boolplay_sound(handle: int)
voidpress_ear_to_portal(portal_name: String, gain_db: float)
boolset_portal_occlusion(portal_name: String, occlusion: float)
boolset_sound_attenuation_scale(handle: int, attenuation_scale: float)
boolset_sound_direction(handle: int, direction: Vector3)
boolset_sound_looping(handle: int, loop: bool)
boolset_sound_position(handle: int, position: Vector3)
boolset_sound_propagation(handle: int, propagate: bool)
boolset_sound_volume_db(handle: int, volume_db: float)
boolstop_sound(handle: int)
voidtake_ear_from_portal()
voidupdate(delta: float)
voidupdate_for_listener(delta: float, listener_position: Vector3)

Property descriptions

hearing

var hearing: HammeriteAudioHearing

Undocumented.

map

var map: HammeriteMap

Undocumented.

mix

var mix: HammeriteAudioMixSettings

Undocumented.

sound_types

var sound_types: HammeriteAudioSoundTypes

Undocumented.

Method descriptions

bus_name()

static func bus_name() -> String

Undocumented.

cleanup()

func cleanup() -> void

Undocumented.

clear_cache()

func clear_cache() -> void

Undocumented.

create_environmental_sound()

func create_environmental_sound(spec: HammeriteAudioSoundSpec) -> int

Undocumented.

create_positional_sound()

func create_positional_sound(spec: HammeriteAudioSoundSpec) -> int

Undocumented.

delete_sound()

func delete_sound(handle: int) -> bool

Undocumented.

initialize()

func initialize(audio_graph: HammeriteAudioNodeGraph, map: HammeriteMap, map_3d: HammeriteMap3D) -> void

Undocumented.

is_sound_playing()

func is_sound_playing(handle: int) -> bool

Undocumented.

play_sound()

func play_sound(handle: int) -> bool

Undocumented.

press_ear_to_portal()

func press_ear_to_portal(portal_name: String, gain_db: float) -> void

Undocumented.

set_portal_occlusion()

func set_portal_occlusion(portal_name: String, occlusion: float) -> bool

Undocumented.

set_sound_attenuation_scale()

func set_sound_attenuation_scale(handle: int, attenuation_scale: float) -> bool

Undocumented.

set_sound_direction()

func set_sound_direction(handle: int, direction: Vector3) -> bool

Undocumented.

set_sound_looping()

func set_sound_looping(handle: int, loop: bool) -> bool

Undocumented.

set_sound_position()

func set_sound_position(handle: int, position: Vector3) -> bool

Undocumented.

set_sound_propagation()

func set_sound_propagation(handle: int, propagate: bool) -> bool

Undocumented.

set_sound_volume_db()

func set_sound_volume_db(handle: int, volume_db: float) -> bool

Undocumented.

stop_sound()

func stop_sound(handle: int) -> bool

Undocumented.

take_ear_from_portal()

func take_ear_from_portal() -> void

Undocumented.

update()

func update(delta: float) -> void

Undocumented.

update_for_listener()

func update_for_listener(delta: float, listener_position: Vector3) -> void

Undocumented.

Hammerite 2.0 · built from 6d57ab2d, 2026-10-17