Skip to content

Harden audio_game_init against runtimes without audio builtins #23

Description

@InauguralPhysicist

audio_start_music already wraps its work in try/catch and returns 0 on failure (src/audio.eigs), so a runtime lacking the audio_music_* builtins degrades gracefully. audio_game_init (src/audio.eigs:39, called bare at tidepool.eigs:144) does not — on a runtime without the SFX builtins it would throw and take down startup, an asymmetry with the music path.

Fix: give audio_game_init the same defensive try/catch (return gracefully on failure) so the game still runs (silently) without audio, mirroring audio_start_music.

Acceptance: with audio builtins present, SFX still initialize; a missing builtin can't crash startup; make test green.

Low severity (the pinned runtime has audio), but good defensive symmetry. See CONTRIBUTING.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions