Program Listing for File PDJE_interface.hpp
↰ Return to documentation for file (include/interface/PDJE_interface.hpp
)
#pragma once
#include "audioPlayer.hpp"
#include "dbRoot.hpp"
#include "NoteTranslator.hpp"
#include "editorObject.hpp"
#include "PDJE_EXPORT_SETTER.hpp"
#include "PDJE_LOG_SETTER.hpp"
enum PLAY_MODE{
FULL_PRE_RENDER,
HYBRID_RENDER,
FULL_MANUAL_RENDER
};
class PDJE_API PDJE{
private:
public:
std::shared_ptr<litedb> DBROOT;
// std::optional<litedb> DBROOT;
PDJE(const fs::path& rootDir);
~PDJE() = default;
std::shared_ptr<audioPlayer> player;
std::shared_ptr<editorObject> editor;
bool
InitPlayer(
PLAY_MODE mode,
trackdata& td,
const unsigned int FrameBufferSize);
bool
InitEditor(
const DONT_SANITIZE &auth_name,
const DONT_SANITIZE &auth_email,
const fs::path& projectRoot
);
bool
GetNoteObjects(
trackdata& td,
OBJ_SETTER_CALLBACK& ObjectSetCallback
);
MUS_VEC
SearchMusic(
const UNSANITIZED& Title,
const UNSANITIZED& composer,
const double bpm = -1);
TRACK_VEC SearchTrack(const UNSANITIZED& Title);
std::shared_ptr<audioPlayer> GetPlayerObject();
};
class PDJE_API ARGSETTER_WRAPPER{
private:
FXControlPannel* fxp;
public:
ARGSETTER_WRAPPER(FXControlPannel* pointer): fxp(pointer){};
~ARGSETTER_WRAPPER() = default;
std::vector<std::string> GetFXArgKeys(FXList fx);
void
SetFXArg(
FXList fx,
const DONT_SANITIZE& key,
double arg);
};