1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-12 09:09:38 +01:00
libtgvoip/audio/AudioOutput.h

47 lines
1.1 KiB
C
Raw Normal View History

2017-02-02 17:24:40 +01:00
//
// libtgvoip is free and unencumbered public domain software.
// For more information, see http://unlicense.org or the UNLICENSE file
// you should have received with this source code distribution.
//
#ifndef LIBTGVOIP_AUDIOOUTPUT_H
#define LIBTGVOIP_AUDIOOUTPUT_H
#include <stdint.h>
#include <string>
#include <vector>
2018-06-04 21:37:43 +02:00
#include <memory>
2020-01-25 18:36:49 +01:00
#include "../controller/media/MediaStreamItf.h"
2017-02-02 17:24:40 +01:00
2020-01-22 12:43:51 +01:00
namespace tgvoip
{
class AudioInputDevice;
class AudioOutputDevice;
2020-01-22 12:43:51 +01:00
namespace audio
{
class AudioOutput : public MediaStreamItf
{
2017-02-02 17:24:40 +01:00
public:
AudioOutput();
AudioOutput(std::string deviceID);
virtual ~AudioOutput();
2020-01-22 12:43:51 +01:00
virtual bool IsPlaying() = 0;
2017-02-02 17:24:40 +01:00
static int32_t GetEstimatedDelay();
virtual std::string GetCurrentDevice();
virtual void SetCurrentDevice(std::string deviceID);
//static std::unique_ptr<AudioOutput> Create(std::string deviceID, void* platformSpecific);
2020-01-22 12:43:51 +01:00
static void EnumerateDevices(std::vector<AudioOutputDevice> &devs);
bool IsInitialized();
2017-02-02 17:24:40 +01:00
protected:
std::string currentDevice;
bool failed;
static int32_t estimatedDelay;
2017-02-02 17:24:40 +01:00
};
2020-01-22 12:43:51 +01:00
} // namespace audio
} // namespace tgvoip
2017-02-02 17:24:40 +01:00
#endif //LIBTGVOIP_AUDIOOUTPUT_H