session volume/mute polling

This commit is contained in:
Hane 2024-02-03 15:33:59 +01:00
commit 165aff07e4
10 changed files with 263 additions and 4 deletions

View file

@ -32,7 +32,6 @@ class Endpoint {
Flows getFlow();
std::wstring getId();
std::wstring getName();
void setVolumeCallback(EndpointVolumeCallback *epc);
void removeVolumeCallback(EndpointVolumeCallback *epc);
@ -134,3 +133,16 @@ class Overseer {
//std::vector<Endpoint*> *captureDevices;
};
class EndpointNewSessionCallback : public IAudioSessionNotification {
public:
//EndpointSituationCallback(IMMDeviceEnumerator *deviceEnumerator, std::vector<Endpoint*> playbackDevices);
EndpointNewSessionCallback(EndpointHandler *eph);
ULONG AddRef();
ULONG Release();
HRESULT QueryInterface(REFIID riid, VOID **ppvInterface);
HRESULT OnSessionCreated(IAudioSessionControl *NewSession);
private:
ULONG ref = 1;
EndpointHandler *eph;
};