forked from MrBesen/soundboard
36 lines
531 B
C
36 lines
531 B
C
|
#pragma once
|
||
|
|
||
|
#include <cstdint>
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
|
||
|
class Config {
|
||
|
public:
|
||
|
Config();
|
||
|
~Config();
|
||
|
|
||
|
bool hasChanged();
|
||
|
void load();
|
||
|
|
||
|
struct RootConfig {
|
||
|
struct AudioConfig {
|
||
|
std::vector<std::string> devices;
|
||
|
} audio;
|
||
|
|
||
|
struct ButtonConfig {
|
||
|
std::string name;
|
||
|
std::string file;
|
||
|
std::string key;
|
||
|
uint64_t offset;
|
||
|
uint64_t length;
|
||
|
|
||
|
bool isValid() const;
|
||
|
};
|
||
|
|
||
|
std::vector<ButtonConfig> buttons;
|
||
|
std::string audioPath;
|
||
|
} rootConfig;
|
||
|
|
||
|
private:
|
||
|
std::string file = "soundboard.json";
|
||
|
};
|