slight code cleanup

This commit is contained in:
Hane 2024-04-09 22:03:53 +02:00
commit b3c663046f
3 changed files with 26 additions and 58 deletions

View file

@ -11,9 +11,9 @@ class Session;
class Endpoint {
public:
Endpoint(IMMDevice* endpoint, uint64_t idx);
Endpoint(IMMDevice* endpoint, uint64_t idx = 0);
//todo: how to forward declare delegate constructors?
Endpoint(IMMDevice* endpoint) : Endpoint(endpoint, 0) {};
//Endpoint(IMMDevice* endpoint) : Endpoint(endpoint, 0) {};
void reloadEndpointChannels();
uint64_t getIndex();
void setIndex(uint64_t idx);
@ -84,7 +84,7 @@ class EndpointVolumeCallback : public IAudioEndpointVolumeCallback {
class EndpointSituationCallback : public IMMNotificationClient {
public:
//EndpointSituationCallback(IMMDeviceEnumerator *deviceEnumerator, std::vector<Endpoint*> playbackDevices);
//EndpointSituationCallback(IMMDeviceEnumerator *deviceEnumerator, std::vector<Endpoint*> playbackDevices, std::vector<Endpoint*> captureDevices);
ULONG AddRef();
ULONG Release();
HRESULT QueryInterface(REFIID riid, VOID **ppvInterface);
@ -94,12 +94,11 @@ class EndpointSituationCallback : public IMMNotificationClient {
HRESULT OnDeviceStateChanged(LPCWSTR pwstrDeviceId, DWORD dwNewState);
HRESULT OnPropertyValueChanged(LPCWSTR pwstrDeviceId, const PROPERTYKEY key);
void fill(IMMDeviceEnumerator *deviceEnumerator, std::vector<Endpoint*> playbackDevices, std::vector<Endpoint*> captureDevices);
private:
ULONG ref = 1;
IMMDeviceEnumerator *deviceEnumerator;
std::vector<Endpoint*> playbackDevices;
std::vector<Endpoint*> captureDevices;
//IMMDeviceEnumerator *deviceEnumerator;
//std::vector<Endpoint*> playbackDevices;
//std::vector<Endpoint*> captureDevices;
};
class Overseer {