Audio

Sound system: channels, assets, and playback.

Overview

Audio is handled by the SoundManager class (src/GalaxyEggbert/Game/SoundManager.hpp/.cpp). It wraps the Urho3D audio subsystem and provides 93 named sound channels matching the original game's sound table.

Sound Assets

93 WAV files are stored in Content/sounds/: sound000.wavsound092.wav. The file indices map directly to SoundChannel enum values. These are the same WAV files as the original Speedy Blupi game.

SoundChannel Enum

Defined in include/GalaxyEggbert/def/SoundChannel.hpp. Values range from SoundChannel0 (reserved) to SoundChannel92. Do not renumber — indices must match the original game's sound table.

Wired Sound Events

SoundChannelFileEvent
SoundChannel1sound001.wavBlupi jumps
SoundChannel4sound004.wavBlupi lands on ground
SoundChannel8sound008.wavBlupi hit (by enemy or hazard tile)
SoundChannel10sound010.wavTreasure collected
SoundChannel11sound011.wavKey collected
SoundChannel42sound042.wavShield collected / bonus life awarded
SoundChannel57sound057.wavLevel exit reached (win)

Playback Behavior

API

class SoundManager {
    void Play(SoundChannel channel, bool loop = false);
    void Stop(SoundChannel channel);
    void StopAll();
    void SetEnabled(bool enabled);
    bool IsEnabled() const;
};

Urho3D Integration

Each channel corresponds to a Urho3D::Sound resource and a Urho3D::SoundSource component on an audio node in the scene. The SoundManager creates all 93 channels at construction by loading resources from the cache.

Web / Browser Audio

Browsers require a user gesture before audio starts. If no sound is heard in the Web build, click the canvas once. This is a browser security policy, not a bug in Galaxy Eggbert.