-
Notifications
You must be signed in to change notification settings - Fork 1
/
volxp.h
49 lines (44 loc) · 1.13 KB
/
volxp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef VOL_XP_H_
#define VOL_XP_H_
#include "tvesettings.h"
#include "volume.h"
#include <windows.h>
#include <string>
class VolXP : public Volume
{
private:
MIXERLINE ml;
MIXERCONTROL mc;
MIXERLINECONTROLS mlcVol;
MIXERLINECONTROLS mlcMute;
MIXERCONTROLDETAILS mcdVol;
MIXERCONTROLDETAILS mcdMute;
MIXERCONTROLDETAILS_UNSIGNED mcdu;
MIXERCONTROLDETAILS_BOOLEAN mcdb;
HWND hCallbackWnd;
HINSTANCE hInstance;
HMIXER mixer;
int minVol;
int maxVol;
const char* WND_CLASS_NAME;
void setupMixerStructs();
void openMixerAndGetLineInfo();
void getLineControls();
void setControlDetails(MIXERCONTROLDETAILS *mcd);
void getControlDetails(MIXERCONTROLDETAILS *mcd);
void change(int steps);
bool isMuted();
void setMuted(bool mute);
int getVolume();
void onControlChanged(HMIXER hMixer, DWORD dwControlID);
void createCallbackWindow();
static LRESULT CALLBACK callbackWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
public:
VolXP(const TveSettings &settings);
~VolXP();
bool up(int steps);
bool down(int steps);
bool toggleMute();
int getError() const;
};
#endif