almost captured, only to hotplug. such is life...

This commit is contained in:
Hane 2023-09-14 18:01:32 +02:00
commit b81cde0f2a
6 changed files with 235 additions and 63 deletions

View file

@ -62,7 +62,7 @@ struct BackEndpointVolumeCallbackInfo {
class EndpointHandler {
public:
EndpointHandler(uint64_t idx);
EndpointHandler(uint64_t idx, Flows flow);
void setBackEndpointVolumeCallbackInfoContent(uint8_t state);
//these two, currently unused. If I use them, I should feel bad.
@ -84,6 +84,7 @@ public:
uint64_t getFrontVisibilityIndex();
EndpointState getFrontVisibilityState();
Flows getFlow();
float getVolume(int channel);
bool getMute();
size_t getState();
@ -102,7 +103,7 @@ private:
uint64_t idx;
Endpoint *ep = nullptr;
EndpointVolumeCallback *epc = nullptr;
Flows flow;
BackEndpointVolumeCallbackInfo callbackInfo;
struct EndpointHandlerFrontVisibility {
EndpointState visibility = EndpointState::ENDPOINT_ALL;
@ -125,15 +126,21 @@ public:
void setAddEndpointWidgetFunction(std::function<void(EndpointHandler*)> addEndpointWidget);
void setEndpointHandlers(std::vector<EndpointHandler*> ephs);
std::vector<EndpointHandler*> getEndpointHandlers();
std::vector<EndpointHandler*> getPlaybackEndpointHandlers();
std::vector<EndpointHandler*> getCaptureEndpointHandlers();
std::vector<Endpoint*> getPlaybackEndpoints();
std::vector<Endpoint*> getCaptureEndpoints();
void pushBackEndpointHandler(EndpointHandler* eph, Flows flow);
uint64_t getPlaybackEndpointsCount();
uint64_t getCaptureEndpointsCount();
void reloadEndpointHandlers();
EndpointHandler* addEndpoint(std::wstring endpointId);
NGuid getGuid();
private:
Overseer *os;
std::vector<EndpointHandler*> endpointHandlers;
std::vector<EndpointHandler*> playbackEndpointHandlers;
std::vector<EndpointHandler*> captureEndpointHandlers;
std::function<void(Roles, std::wstring /* endpointid */)> changeFrontDefaults;
std::function<void(uint64_t /* epw id */)> removeEndpointWidget;
std::function<void(EndpointHandler*)> addEndpointWidget;