MixerMicrophoneValue.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef _MixerMicrophoneValue_H_
  2. #define _MixerMicrophoneValue_H_
  3. #pragma once
  4. #include "logproc.h"
  5. #include <windows.h>
  6. #include <string>
  7. class MixerMicrophoneValue
  8. {//Adjust the microphone volume
  9. MIXERCONTROL LastMicroMixerControl;//vixercontrol of linked wavein of target device
  10. MIXERCONTROL LastMicroMixerControl_Mute;//mixer control for mute linked wavein of target device
  11. int ID_Device;
  12. int ID_Line_Dest;
  13. int ID_Line_SRC;
  14. int ID_Line_SRC_Num_Control;
  15. std::string NameOfLinkedWaveIn;
  16. bool flagLinkedToDeviceControl;
  17. std::string NameOfDefaultWaveIn;
  18. std::string NameOfTargetWaveIn;
  19. std::string defaultname;
  20. int ID_OfDefaultWaveIn;
  21. int ID_OfTargetWaveIn;
  22. unsigned int lastError;
  23. bool LinkToMicrophone(void);
  24. int CheckDefaultInDevice(void);//Get ID for Default WaveIn device
  25. public:
  26. MixerMicrophoneValue(void);
  27. virtual ~MixerMicrophoneValue(void);
  28. const std::string &GetNameOfLinkedDevice();
  29. void Release(void);
  30. double GetVolume(void);
  31. void SetVolume(double volume);
  32. int MuteOff(bool state);
  33. bool IsMuteOff();
  34. int LinkToDevice(const std::string &namedevice);
  35. };
  36. #endif //_MixerMicrophoneValue_H_