2017-06-18 19:32:20 +02: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_AUDIOOUTPUTPHP_H
|
|
|
|
#define LIBTGVOIP_AUDIOOUTPUTPHP_H
|
|
|
|
|
2017-06-22 14:48:52 +02:00
|
|
|
#include "../libtgvoip/audio/AudioOutput.h"
|
2017-07-01 19:40:28 +02:00
|
|
|
#include "../main.h"
|
|
|
|
#include "../libtgvoip/VoIPController.h"
|
2017-06-18 19:32:20 +02:00
|
|
|
|
|
|
|
namespace tgvoip{ namespace audio{
|
2017-07-04 15:50:02 +02:00
|
|
|
class AudioOutputModule : public AudioOutput{
|
2017-06-18 19:32:20 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2017-07-04 15:50:02 +02:00
|
|
|
AudioOutputModule(std::string deviceID, void* controller);
|
|
|
|
virtual ~AudioOutputModule();
|
2017-06-18 19:32:20 +02:00
|
|
|
virtual void Configure(uint32_t sampleRate, uint32_t bitsPerSample, uint32_t channels);
|
|
|
|
virtual void Start();
|
|
|
|
virtual void Stop();
|
|
|
|
virtual bool IsPlaying() override;
|
|
|
|
virtual float GetLevel() override;
|
2017-07-06 18:12:49 +02:00
|
|
|
unsigned char * readFrames();
|
2017-07-04 15:50:02 +02:00
|
|
|
static void EnumerateDevices(std::vector<AudioOutputDevice>& devs);
|
2017-06-18 19:32:20 +02:00
|
|
|
|
2017-06-22 20:38:20 +02:00
|
|
|
private:
|
2017-07-06 18:12:49 +02:00
|
|
|
VoIP *wrapper;
|
2017-06-18 19:32:20 +02:00
|
|
|
bool running;
|
|
|
|
};
|
|
|
|
}}
|
|
|
|
|
|
|
|
#endif //LIBTGVOIP_AUDIOOUTPUTPHP_H
|