AudioInput.h 991 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // libtgvoip is free and unencumbered public domain software.
  3. // For more information, see http://unlicense.org or the UNLICENSE file
  4. // you should have received with this source code distribution.
  5. //
  6. #ifndef LIBTGVOIP_AUDIOINPUT_H
  7. #define LIBTGVOIP_AUDIOINPUT_H
  8. #include <stdint.h>
  9. #include <vector>
  10. #include <string>
  11. #include "../MediaStreamItf.h"
  12. namespace tgvoip{
  13. class AudioInputDevice;
  14. class AudioOutputDevice;
  15. namespace audio{
  16. class AudioInput : public MediaStreamItf{
  17. public:
  18. AudioInput();
  19. AudioInput(std::string deviceID);
  20. virtual ~AudioInput();
  21. bool IsInitialized();
  22. virtual std::string GetCurrentDevice();
  23. virtual void SetCurrentDevice(std::string deviceID);
  24. //static AudioInput* Create(std::string deviceID, void* platformSpecific);
  25. static void EnumerateDevices(std::vector<AudioInputDevice>& devs);
  26. static int32_t GetEstimatedDelay();
  27. protected:
  28. std::string currentDevice;
  29. bool failed;
  30. static int32_t estimatedDelay;
  31. };
  32. }}
  33. #endif //LIBTGVOIP_AUDIOINPUT_H