poll merge squash

This commit is contained in:
Hane 2024-02-07 17:20:59 +01:00
commit 40bee90610
21 changed files with 2753 additions and 261 deletions

View file

@ -1,14 +1,80 @@
#pragma once
//TODO enum capullo
#define ENDPOINT_MASTER_VOLUME -1
#define ENDPOINT_LEFT_CHANNEL_VOLUME 0
#define ENDPOINT_RIGHT_CHANNEL_VOLUME 1
#include <vector>
#include <iostream>
#include <string>
#include <bitset>
#include <climits>
#include <locale>
#include "debug.h"
//TODO: Use tr();? QTranslator
#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"
//INIT BACK
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); */
/* } */
};
class OverseerHandler;
extern OverseerHandler *osh;