mixer/src/global.h

116 lines
2.2 KiB
C++

#pragma once
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdio.h>
#include <errno.h>
#include <limits.h>
#include <codecvt>
#include <vector>
#include <iostream>
#include <string>
#include <bitset>
#include <locale>
#include <map>
#include <thread>
#include "debug.h"
//#include "settings.h"
//TODO: Use tr();? QTranslator
#define APP_NAME "MixerQ"
#define LAPP_NAME L"MixerQ"
#define STRING_MUTE "Mute"
#define STRING_UNMUTE "Unmute"
#define STRING_QUIT "Quit"
#define STRING_TITLE "Mixer Fachero"
#define STRING_ROLE_CONSOLE "Console"
#define STRING_ROLE_MULTIMEDIA "Multimedia"
#define STRING_ROLE_COMMUNICATIONS "Communications"
#define STRING_ROLE_ALL "All"
#define STRING_SYSTEM_SOUNDS "System Sounds"
#define LSTRING_SYSTEM_SOUNDS L"System Sounds"
#define STRING_CP "Open Control Panel"
#define STRING_ABOUT "About"
#define STRING_STARTUP "Run at startup"
#define STRING_CHANNELS "Show endpoint channels"
#define STRING_NOENDPOINT "No active endpoints"
#define LSTRING_UNNAMED_SESSION L"Unnamed session"
//INIT BACK
enum SettingsTargetDirectory {
HOME_DIR = 0,
APP_PATH = (1 << 0),
CUSTOM = (1 << 1),
};
enum ProcessedNativeEvent {
NONE = 0,
COLORS = (1 << 0),
};
enum AudioChannel {
CHANNEL_LEFT = (1 << 0),
CHANNEL_RIGHT = (1 << 1),
CHANNEL_MAIN = ~0,
};
enum EndpointState {
ENDPOINT_ACTIVE = (1 << 0),
ENDPOINT_DISABLED = (1 << 1),
ENDPOINT_NOTPRESENT = (1 << 2),
ENDPOINT_UNPLUGGED = (1 << 3),
ENDPOINT_ALL = 0x0F
};
enum SessionState {
ACTIVE = (1 << 0),
INACTIVE = (1 << 1),
EXPIRED = (1 << 2),
DISCONNECTED = (1 << 3),
ALL = 0x0F
};
enum Flows {
FLOW_PLAYBACK = (1 << 0),
FLOW_CAPTURE = (1 << 1),
FLOW_BOTH = (1 << 2),
};
enum Roles {
ROLE_CONSOLE = (1 << 0),
ROLE_MULTIMEDIA = (1 << 1),
ROLE_COMMUNICATIONS = (1 << 2),
ROLE_ALL = 0x07,
};
struct NGuid {
//todo: still leaking?
uint32_t data1;
uint16_t data2;
uint16_t data3;
unsigned char data4[8];
/* void freeData4(){ */
/* int i = 0; */
/* do{ */
/* if(this->data4 + i != nullptr) free(data4 + i); */
/* i++; */
/* }while (i < 8); */
/* } */
};
namespace ini {
class UserSettings;
}
extern ini::UserSettings *set;
class OverseerHandler;
extern OverseerHandler *osh;