/** * Spatial sound propagation function (ADR-172 Phase 3). * * Pure logic: given a `Sound` emission, a listener entity-id, and the * world-model, returns the `AudibilityEvent` the listener perceives — * or `null` if the sound is silent at the listener's location. * * The function is structured around three pieces: * * 1. **Edge-graph construction** (`getAcousticEdges`) — for any room, * enumerate the rooms it's acoustically connected to, with each * edge's cost. Today's edge sources are exits-with-doors and walls * (per ADR-173). Future acoustic conduits ride on the same shape * without changes here. * * 2. **Path search** (`findShortestAcousticPath`) — Dijkstra from * source room to listener's room. Path cost = sum of edge costs + * 1 unit per intermediate room. Wall edges traversed are recorded * so the resulting `AudibilityEvent` can name a wall when the path * crosses exactly one. * * 3. **Clarity → tier mapping** (`clarityToTier`) — the ADR-172 * audibility-tier table. * * The propagation function does *not* enumerate listeners — that is * Phase 5/6's dispatcher. This file is `propagate(sound, listenerId, * world, timestamp) → event | null`, intended to be called per * listener. * * Owner context: `@sharpee/engine` — runtime / sound subsystem. * * @see ADR-172 — Spatial Sound Propagation * @see ADR-173 — Wall Adjacency Primitive (substrate) */ import type { EntityId } from '@sharpee/core'; import { type AudibilityTier, type IAudibilityEvent, type ISound } from '@sharpee/if-domain'; import { WorldModel } from '@sharpee/world-model'; /** * Propagate a sound emission to a single listener. * * Returns an `AudibilityEvent` for the listener if the sound reaches * them at any tier above `silent`; returns `null` if the sound is * silent at the listener's location (no reachable path, cost too high * for the volume budget, or the listener has no resolvable room). * * Same-room emissions short-circuit to `full` audibility regardless of * intervening boundaries (degenerate case from ADR-172 §Propagation * function step 5). * * @param sound The emission shape. * @param listenerId The entity id of the listener. * @param world The world-model carrying rooms, walls, doors, * and obstructors. * @param timestamp Engine-provided turn-sequence integer for event * ordering. Phase 6's dispatcher threads this from * the turn manager. */ export declare function propagate(sound: ISound, listenerId: EntityId, world: WorldModel, timestamp: number): IAudibilityEvent | null; /** * Map a clarity value (volume budget − accumulated path cost) to the * ADR-172 audibility tier table. * * Exposed for testability and so that future composition layers can * reuse the mapping (e.g., a conversation-choreography layer that * wants to show a "what would the audibility be at this volume from * here?" debug overlay). */ export declare function clarityToTier(clarity: number): AudibilityTier; //# sourceMappingURL=propagation.d.ts.map