mirror of
https://github.com/danog/libtgvoip.git
synced 2024-11-30 04:39:03 +01:00
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
//
|
|
// 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>
|
|
#include <memory>
|
|
#include "../controller/media/MediaStreamItf.h"
|
|
|
|
namespace tgvoip
|
|
{
|
|
|
|
class AudioInputDevice;
|
|
class AudioOutputDevice;
|
|
|
|
namespace audio
|
|
{
|
|
class AudioOutput : public MediaStreamItf
|
|
{
|
|
public:
|
|
AudioOutput();
|
|
AudioOutput(std::string deviceID);
|
|
virtual ~AudioOutput();
|
|
virtual bool IsPlaying() = 0;
|
|
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);
|
|
static void EnumerateDevices(std::vector<AudioOutputDevice> &devs);
|
|
bool IsInitialized();
|
|
|
|
protected:
|
|
std::string currentDevice;
|
|
bool failed;
|
|
static int32_t estimatedDelay;
|
|
};
|
|
} // namespace audio
|
|
} // namespace tgvoip
|
|
|
|
#endif //LIBTGVOIP_AUDIOOUTPUT_H
|