Vertex Docs

AudioManager

Description: The AudioManager class handles loading, managing, and playing audio assets in a VertexEngine game. Audio files are loaded once and cached for efficient reuse. Supported formats include .mp3 and .ogg.

Example: Usage

from VertexEngine.assets import AudioManager

# Load audio files
AudioManager.load_sound("click", "assets/audio/click.ogg")
AudioManager.load_music("theme", "assets/audio/theme.mp3")

# Play audio
AudioManager.play_sound("click")
AudioManager.play_music("theme")

Managed Audio Types

Common Methods

Returns

AudioManager methods either load and return an audio object or control playback of previously loaded audio.

Notes