class
MusicSystem
- Module
- Audio
- Header
#include "Audio/MusicSystem.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
MusicSystem& | Get | |
void | Update | |
void | Shutdown | Releases both track buffers and clears the playlist. |
void | Play | |
void | Stop | |
void | Pause | |
void | Resume | |
bool | IsPlaying | |
void | CrossfadeTo | |
void | SetPlaylist | |
void | AddToPlaylist | |
void | ClearPlaylist | |
void | Next | |
void | Previous | |
void | SetShuffle | |
bool | GetShuffle | |
void | SetRepeat | |
bool | GetRepeat | |
void | SetVolume | Volume (relative to Music bus) |
float | GetVolume | |
const std::string& | GetCurrentTrack | |
int | GetCurrentTrackIndex | |
int | GetPlaylistSize |
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() constCrossfadeTo
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() constSetRepeat
C++
void SetRepeat(bool repeat)GetRepeat
C++
bool GetRepeat() constSetVolume
C++
void SetVolume(float volume)Volume (relative to Music bus)
GetVolume
C++
float GetVolume() constGetCurrentTrack
C++
const std::string& GetCurrentTrack() constGetCurrentTrackIndex
C++
int GetCurrentTrackIndex() constGetPlaylistSize
C++
int GetPlaylistSize() constGenerated from Audio/MusicSystem.h via audio.json · Oct 26, 2026Version 1.0.0