wip partial refactor
This commit is contained in:
parent
507dc37ad6
commit
e43e4c0569
7 changed files with 114 additions and 53 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "global.h"
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <wstring>
|
||||
|
||||
#include <Windows.h>
|
||||
#include <mmdeviceapi.h>
|
||||
|
|
@ -19,12 +20,12 @@
|
|||
//#include <comip.h>
|
||||
#include <Winerror.h>
|
||||
|
||||
class EndpointWidget;
|
||||
//class EndpointWidget;
|
||||
|
||||
class EndpointCallback : public IAudioEndpointVolumeCallback {
|
||||
|
||||
public:
|
||||
EndpointCallback();
|
||||
EndpointCallback(Endpoint* ep);
|
||||
|
||||
ULONG AddRef();
|
||||
ULONG Release();
|
||||
|
|
@ -33,7 +34,8 @@ class EndpointCallback : public IAudioEndpointVolumeCallback {
|
|||
~EndpointCallback();
|
||||
|
||||
private:
|
||||
ULONG ref;
|
||||
ULONG ref = 1;
|
||||
Endpoint* ep;
|
||||
PAUDIO_VOLUME_NOTIFICATION_DATA update;
|
||||
};
|
||||
|
||||
|
|
@ -41,6 +43,8 @@ class Endpoint {
|
|||
|
||||
public:
|
||||
Endpoint(IMMDevice* endpoint);
|
||||
uint64_t getIndex();
|
||||
void setIndex(uint64_t idx);
|
||||
void setVolume(int channel, float volume);
|
||||
/* float getLeftChannelVolume(); */
|
||||
/* float getRightChannelVolume(); */
|
||||
|
|
@ -56,7 +60,8 @@ class Endpoint {
|
|||
IMMDevice* endpoint;
|
||||
IAudioEndpointVolume *endpointVolume ;
|
||||
IPropertyStore *properties;
|
||||
LPWSTR friendlyName;
|
||||
std::wstring friendlyName;
|
||||
uint64_t idx;
|
||||
// LPWSTR endpointID = NULL;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue