Class audioPlayer
Defined in File audioPlayer.hpp
Class Documentation
-
class audioPlayer
The music handler class this is the music handler class. you can play/stop music, controlling fx, attach other music in realtime manually or getting music’s playing position and consumed frames.
Public Functions
-
inline const std::string GetStatus()
the status getter for binded languages.
-
bool Activate()
Plays music.
-
bool Deactivate()
Stops music.
-
void ChangeCursorPos(unsigned long long pos)
change the prerendered music’s cursor(the playing position).
-
unsigned long long GetConsumedFrames()
gets consumed frames. with this, you can get how many frames are consumed and music’s playback time. to get playback time, divide the returned value with 48000. The result is Seconds.
- Returns:
consumed frames
-
FXControlPannel *GetFXControlPannel(const std::string &title = "__PDJE__MAIN__")
fx controller getter this returns the fx controller. with this, you can control the fx in realtime manually.
- Parameters:
title – the music to control. “__PDJE__MAIN__” means the prerendered music.
- Returns:
FXControlPannel* but the “title” doesn’t exists, it returns nullptr.
-
MusicControlPannel *GetMusicControlPannel()
music controller getter this returns the music controller. with this, you can load music, stop music in realtime manually.
- Returns:
MusicControlPannel* if something wrong, it returns nullptr.
-
audioPlayer(litedb &db, trackdata &td, const unsigned int frameBufferSize, const bool hasManual = false)
audio handler constructor. specified for pre-render mode.
- Parameters:
db – litedb(Root database) object
td – track_data
frameBufferSize – the buffer size.
hasManual – enable manual features. if don’t, you can’t use FX controller, Music controller.
-
audioPlayer(const unsigned int frameBufferSize)
audio handler constructor. specified for manual render mode.
- Parameters:
frameBufferSize – the buffer size.
-
~audioPlayer()
Public Members
-
std::string STATUS = "OK"
the handler status. check when something wrong. do not change this manually.
-
inline const std::string GetStatus()