-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.hpp
More file actions
38 lines (31 loc) · 1.06 KB
/
Copy pathconfig.hpp
File metadata and controls
38 lines (31 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <string>
#include "logger.hpp"
struct Config {
std::string address;
int port;
std::string address_left;
std::string address_right;
std::string address_overwhelmingly_loud;
bool auto_volume_threshold;
bool auto_excessive_threshold;
float volume_threshold_multiplier;
float excessive_threshold_multiplier;
LogLevel log_level;
float differential_threshold;
float volume_threshold;
float excessive_volume_threshold;
int reset_timeout_ms;
int timeout_ms;
// Audio device selection
std::string selected_device_id;
// Default constructor with reasonable defaults
Config();
// Load configuration from file, returns true if successful
bool LoadFromFile(const std::string& filename = "");
// Create default config file if it doesn't exist
static bool CreateDefaultConfigFile(const std::string& filename = "");
bool SaveToFile(const std::string& filename = "") const;
// Get the default config file path in AppData
static std::string GetDefaultConfigPath();
};