Vertex Docs

AudioManager.load_music(path)

Description: Loads a music track from disk into memory and registers it with the AudioManager. Once loaded, the music can be played, paused, stopped, or looped without needing to reload the file each time. This method is ideal for background music or long audio tracks that will be reused during gameplay.

Usage

from VertexEngine.audio import AudioManager

music = AudioManager.load_music("assets/audio/background.mp3")

Parameters

Returns

Music object — An object representing the loaded music track. This object can be stored in a variable and used to control playback (play, pause, stop, set volume, loop, etc.).

Notes