1er real; slider x ept ok no evts no map
This commit is contained in:
parent
cd2d0b5da8
commit
3ea2e739ae
10 changed files with 317 additions and 51 deletions
56
src/back/backlasses.h
Normal file
56
src/back/backlasses.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
#pragma once
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define log_debugcpp(str) do { \
|
||||
std::cout << "[DEBUG]" << "(" << __FILE__ << ":" << __LINE__ << "): " << str << std::endl; \
|
||||
} while (0)
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#include <Windows.h>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <combaseapi.h>
|
||||
#include <initguid.h>
|
||||
#include <functiondiscoverykeys_devpkey.h>
|
||||
|
||||
#include <endpointvolume.h>
|
||||
#include <audiopolicy.h>
|
||||
#include <audioclient.h>
|
||||
//#include <comdef.h>
|
||||
//#include <comip.h>
|
||||
#include <Winerror.h>
|
||||
|
||||
class Endpoint {
|
||||
|
||||
public:
|
||||
Endpoint(IMMDevice* endpoint);
|
||||
void setVolume(float volume);
|
||||
|
||||
private:
|
||||
IMMDevice* endpoint;
|
||||
IAudioEndpointVolume *endpointVolume;
|
||||
|
||||
};
|
||||
|
||||
class Overseer {
|
||||
//TODO singleton?
|
||||
public:
|
||||
Overseer();
|
||||
std::vector<Endpoint*> getPlaybackEndpoints();
|
||||
void reloadEndpoints();
|
||||
//~Overseer();
|
||||
//int getDefaultPlaybackEndpoint(Endpoint** defaultEndpoint);
|
||||
//int getDefaultCaptureEndpoint(Endpoint** defaultEndpoint);
|
||||
//int getCaptureEndpoints(std::vector<Endpoint*> *captureEndpoints);
|
||||
//IMMDeviceEnumerator** setOrigin();
|
||||
|
||||
private:
|
||||
unsigned int numPlaybackEndpoints;
|
||||
IMMDeviceEnumerator *deviceEnumerator;
|
||||
std::vector<Endpoint*> playbackDevices;
|
||||
void initCOMLibrary();
|
||||
//IMMDeviceCollection *deviceCollection;
|
||||
//int numCaptureEndpoints;
|
||||
//std::vector<Endpoint*> *captureDevices;
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue