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_AUDIOINPUTPHP_H
|
|
|
|
#define LIBTGVOIP_AUDIOINPUTPHP_H
|
|
|
|
|
|
|
|
#include "phpcpp.h"
|
|
|
|
#include "libtgvoip/audio/AudioInput.h"
|
|
|
|
#include "libtgvoip/threading.h"
|
|
|
|
|
|
|
|
namespace tgvoip{ namespace audio{
|
|
|
|
class AudioInputPHP : public AudioInput{
|
|
|
|
|
|
|
|
public:
|
2017-06-19 15:39:45 +02:00
|
|
|
AudioInputPHP(Php::Value callbacks);
|
2017-06-18 19:32:20 +02:00
|
|
|
virtual ~AudioInputPHP();
|
2017-06-19 15:39:45 +02:00
|
|
|
Php::Value configureMethod;
|
|
|
|
Php::Value startMethod;
|
|
|
|
Php::Value stopMethod;
|
|
|
|
|
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();
|
2017-06-19 15:39:45 +02:00
|
|
|
virtual void writeFrames(Php::Parameters ¶ms);
|
2017-06-18 19:32:20 +02:00
|
|
|
private:
|
|
|
|
bool running;
|
|
|
|
};
|
|
|
|
}}
|
|
|
|
|
|
|
|
#endif //LIBTGVOIP_AUDIOINPUTPHP_H
|