mirror of
https://github.com/danog/libtgvoip.git
synced 2024-12-02 09:37:52 +01:00
More fixes
This commit is contained in:
parent
2b8659140b
commit
f4bfddb1cd
@ -12,7 +12,7 @@
|
||||
tgvoip::OpusEncoder::OpusEncoder(MediaStreamItf *source):queue(11), bufferPool(960*2, 10){
|
||||
this->source=source;
|
||||
source->SetCallback(tgvoip::OpusEncoder::Callback, this);
|
||||
enc=opus_encoder_create(48000, 1, OPUS_APPLICATION_VOIP, NULL);
|
||||
enc=opus_encoder_create(48000, 1, OPUS_APPLICATION_AUDIO, NULL);
|
||||
opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10));
|
||||
opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(15));
|
||||
opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(1));
|
||||
|
@ -43,7 +43,7 @@ AudioInput::AudioInput(std::string deviceID) : currentDevice(deviceID){
|
||||
failed=false;
|
||||
}
|
||||
|
||||
AudioInput *AudioInput::Create(std::string deviceID, void* controller){
|
||||
AudioInput *AudioInput::Create(std::string deviceID, VoIPController* controller){
|
||||
#ifdef LIBTGVOIP_CUSTOM
|
||||
return new AudioInputModule(deviceID, controller);
|
||||
#elif defined(__ANDROID__)
|
||||
|
@ -16,20 +16,21 @@ namespace tgvoip{
|
||||
|
||||
class AudioInputDevice;
|
||||
class AudioOutputDevice;
|
||||
class VoIPController;
|
||||
|
||||
namespace audio{
|
||||
class AudioInput : public MediaStreamItf{
|
||||
public:
|
||||
AudioInput();
|
||||
AudioInput(std::string deviceID);
|
||||
AudioInput(std::string deviceID, void* controller);
|
||||
AudioInput(std::string deviceID, VoIPController* controller);
|
||||
virtual ~AudioInput();
|
||||
|
||||
virtual void Configure(uint32_t sampleRate, uint32_t bitsPerSample, uint32_t channels)=0;
|
||||
bool IsInitialized();
|
||||
virtual std::string GetCurrentDevice();
|
||||
virtual void SetCurrentDevice(std::string deviceID);
|
||||
static AudioInput* Create(std::string deviceID, void* controller);
|
||||
static AudioInput* Create(std::string deviceID, VoIPController* controller);
|
||||
static void EnumerateDevices(std::vector<AudioInputDevice>& devs);
|
||||
static int32_t GetEstimatedDelay();
|
||||
|
||||
|
@ -39,7 +39,7 @@ int AudioOutput::systemVersion;
|
||||
#endif
|
||||
int32_t AudioOutput::estimatedDelay=60;
|
||||
|
||||
AudioOutput *AudioOutput::Create(std::string deviceID, void* controller){
|
||||
AudioOutput *AudioOutput::Create(std::string deviceID, VoIPController* controller){
|
||||
#ifdef LIBTGVOIP_CUSTOM
|
||||
return new AudioOutputModule(deviceID, controller);
|
||||
#elif defined(__ANDROID__)
|
||||
|
@ -15,6 +15,7 @@
|
||||
namespace tgvoip{
|
||||
|
||||
class AudioInputDevice;
|
||||
class VoIPController;
|
||||
class AudioOutputDevice;
|
||||
|
||||
namespace audio{
|
||||
@ -22,7 +23,7 @@ class AudioOutput : public MediaStreamItf{
|
||||
public:
|
||||
AudioOutput();
|
||||
AudioOutput(std::string deviceID);
|
||||
AudioOutput(std::string deviceID, void* controller);
|
||||
AudioOutput(std::string deviceID, VoIPController* controller);
|
||||
virtual ~AudioOutput();
|
||||
virtual void Configure(uint32_t sampleRate, uint32_t bitsPerSample, uint32_t channels)=0;
|
||||
virtual bool IsPlaying()=0;
|
||||
@ -30,7 +31,7 @@ public:
|
||||
static int32_t GetEstimatedDelay();
|
||||
virtual std::string GetCurrentDevice();
|
||||
virtual void SetCurrentDevice(std::string deviceID);
|
||||
static AudioOutput* Create(std::string deviceID, void* controller);
|
||||
static AudioOutput* Create(std::string deviceID, VoIPController* controller);
|
||||
static void EnumerateDevices(std::vector<AudioOutputDevice>& devs);
|
||||
bool IsInitialized();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user