mirror of
https://github.com/danog/libtgvoip.git
synced 2024-11-27 04:34:42 +01:00
5380aaba0d
- Refactored audio I/O to allow sharing a common context between input and output, for those OSes that require this - Rewritten periodic operation handling to use a "run loop" thingy instead of an ugly loop formerly known as tick thread - Fixed a bunch of compiler warnings (closes #13) - Added automake so you no longer need to use the GYP file for standalone builds (closes #43)
43 lines
1.0 KiB
C++
43 lines
1.0 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 "../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;
|
|
};
|
|
}}
|
|
|
|
#endif //LIBTGVOIP_AUDIOOUTPUT_H
|