class

MusicSystem

Module
Audio
Header
#include "Audio/MusicSystem.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
MusicSystem&Get
voidUpdate
voidShutdownReleases both track buffers and clears the playlist.
voidPlay
voidStop
voidPause
voidResume
boolIsPlaying
voidCrossfadeTo
voidSetPlaylist
voidAddToPlaylist
voidClearPlaylist
voidNext
voidPrevious
voidSetShuffle
boolGetShuffle
voidSetRepeat
boolGetRepeat
voidSetVolumeVolume (relative to Music bus)
floatGetVolume
const std::string&GetCurrentTrack
intGetCurrentTrackIndex
intGetPlaylistSize

Function details

Get

C++
static MusicSystem& Get()

Update

C++
void Update(float deltaTime)

Shutdown

C++
void Shutdown()

Releases both track buffers and clears the playlist. The singleton outlives any World, so its sources must be dropped before AudioEngine shuts down — otherwise they unwind against a destroyed engine.

Play

C++
void Play(const std::string& filePath, bool loop = true, float fadeInMs = 1000.0f)

Stop

C++
void Stop(float fadeOutMs = 1000.0f)

Pause

C++
void Pause()

Resume

C++
void Resume()

IsPlaying

C++
bool IsPlaying() const

CrossfadeTo

C++
void CrossfadeTo(const std::string& filePath, float durationMs = 2000.0f, bool loop = true)

SetPlaylist

C++
void SetPlaylist(const std::vector<std::string>& tracks)

AddToPlaylist

C++
void AddToPlaylist(const std::string& filePath)

ClearPlaylist

C++
void ClearPlaylist()

Next

C++
void Next(float crossfadeMs = 2000.0f)

Previous

C++
void Previous(float crossfadeMs = 2000.0f)

SetShuffle

C++
void SetShuffle(bool shuffle)

GetShuffle

C++
bool GetShuffle() const

SetRepeat

C++
void SetRepeat(bool repeat)

GetRepeat

C++
bool GetRepeat() const

SetVolume

C++
void SetVolume(float volume)

Volume (relative to Music bus)

GetVolume

C++
float GetVolume() const

GetCurrentTrack

C++
const std::string& GetCurrentTrack() const

GetCurrentTrackIndex

C++
int GetCurrentTrackIndex() const

GetPlaylistSize

C++
int GetPlaylistSize() const
Generated from Audio/MusicSystem.h via audio.json · Oct 26, 2026Version 1.0.0