phantom header and default role recollection
This commit is contained in:
parent
cb17bcb435
commit
5638f2e1f3
10 changed files with 354 additions and 46 deletions
|
|
@ -19,11 +19,12 @@
|
|||
//#include <comdef.h>
|
||||
//#include <comip.h>
|
||||
#include <Winerror.h>
|
||||
#include <stringapiset.h>
|
||||
|
||||
#include "global.h"
|
||||
#include "contclasses.h"
|
||||
|
||||
class EndpointCallback;
|
||||
class EndpointVolumeCallback;
|
||||
|
||||
class Endpoint {
|
||||
|
||||
|
|
@ -36,9 +37,14 @@ class Endpoint {
|
|||
float getVolume(int channel);
|
||||
void setMute(NGuid* guid, bool muted);
|
||||
bool getMute();
|
||||
void setState(uint8_t state);
|
||||
uint8_t getState();
|
||||
uint8_t getRoles();
|
||||
void setRoles(uint8_t role);
|
||||
std::wstring getId();
|
||||
std::wstring getName();
|
||||
void setCallback(EndpointCallback *epc);
|
||||
void removeCallback(EndpointCallback *epc);
|
||||
void setVolumeCallback(EndpointVolumeCallback *epc);
|
||||
void removeVolumeCallback(EndpointVolumeCallback *epc);
|
||||
~Endpoint();
|
||||
|
||||
private:
|
||||
|
|
@ -47,20 +53,23 @@ class Endpoint {
|
|||
IAudioEndpointVolume *endpointVolume ;
|
||||
IPropertyStore *properties;
|
||||
std::wstring friendlyName;
|
||||
std::wstring endpointId;
|
||||
uint8_t endpointState;
|
||||
uint8_t endpointRoles = 0;
|
||||
uint64_t idx;
|
||||
// LPWSTR endpointID = NULL;
|
||||
};
|
||||
|
||||
class EndpointCallback : public IAudioEndpointVolumeCallback {
|
||||
class EndpointVolumeCallback : public IAudioEndpointVolumeCallback {
|
||||
|
||||
public:
|
||||
EndpointCallback(Endpoint* ep);
|
||||
EndpointVolumeCallback(Endpoint* ep);
|
||||
|
||||
ULONG AddRef();
|
||||
ULONG Release();
|
||||
HRESULT QueryInterface(REFIID riid, VOID **ppvInterface);
|
||||
HRESULT OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA update);
|
||||
//~EndpointCallback();
|
||||
//~EndpointVolumeCallback();
|
||||
|
||||
private:
|
||||
ULONG ref = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue