1
0
mirror of https://github.com/danog/php-libtgvoip.git synced 2024-12-02 17:28:12 +01:00
php-libtgvoip/audio/AudioInputModule.h

40 lines
978 B
C
Raw Normal View History

//
// 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_AUDIOINPUTPHP_H
#define LIBTGVOIP_AUDIOINPUTPHP_H
2017-06-22 14:48:52 +02:00
#include "../libtgvoip/audio/AudioInput.h"
#include "../libtgvoip/threading.h"
2017-07-01 19:40:28 +02:00
#include "../main.h"
#include "../libtgvoip/VoIPController.h"
using namespace tgvoip;
using namespace tgvoip::audio;
namespace tgvoip{ namespace audio{
2017-07-04 15:50:02 +02:00
class AudioInputModule : public AudioInput{
public:
2017-07-04 15:50:02 +02:00
AudioInputModule(std::string deviceID, void* controller);
virtual ~AudioInputModule();
2017-06-19 15:39:45 +02:00
virtual void Configure(uint32_t sampleRate, uint32_t bitsPerSample, uint32_t channels);
virtual void Start();
virtual void Stop();
2017-07-05 23:24:07 +02:00
bool writeFrames(unsigned char* data);
2017-07-04 15:50:02 +02:00
static void EnumerateDevices(std::vector<AudioInputDevice>& devs);
private:
2017-07-01 19:40:28 +02:00
VoIP* wrapper;
bool running;
};
}}
#endif //LIBTGVOIP_AUDIOINPUTPHP_H