| 6 |
| 7 | #ifndef LIBTGVOIP_AUDIOOUTPUT_H |
| 8 | #define LIBTGVOIP_AUDIOOUTPUT_H |
| 9 |
| 10 | #include "../MediaStreamItf.h" |
| 11 |
| 12 | #include <cstdint> |
| 13 | #include <memory> |
| 14 | #include <string> |
| 15 | #include <vector> |
| 16 |
| 17 | namespace tgvoip |
| 18 | { |
| 19 |
| 20 | class AudioInputDevice; |
| 21 | class AudioOutputDevice; |
| 22 |
| 23 | namespace audio |
| 24 | { |
| 25 |
| 26 | class AudioOutput : public MediaStreamItf |
| 27 | { |
| 28 | public: |
| 29 | AudioOutput(); |
| 30 | AudioOutput(std::string deviceID); |
| 31 | virtual ~AudioOutput(); |
| 32 | virtual bool IsPlaying() = 0; |
| 33 | static std::int32_t GetEstimatedDelay(); |
| 34 | virtual std::string GetCurrentDevice() const; |
| 35 | virtual void SetCurrentDevice(std::string deviceID); |
| 36 | static void EnumerateDevices(std::vector<AudioOutputDevice>& devs); |
| 37 | bool IsInitialized() const; |
| 38 |
| 39 | protected: |
| 40 | std::string m_currentDevice; |
| 41 | bool m_failed = false; |
| 42 | static std::int32_t m_estimatedDelay; |
| 43 | }; |
| 44 |
| 45 | } // namespace audio |
| 46 |
| 47 | } // namespace tgvoip |
| 48 |
| 49 | #endif //LIBTGVOIP_AUDIOOUTPUT_H |
| 50 |