mirror of
https://github.com/danog/libtgvoip.git
synced 2024-12-02 17:51:06 +01:00
333c4a1101
Added simple audio resampler Replaced prebuilt static libs with their sources & added that to all project files (closes #5)
41 lines
837 B
C++
41 lines
837 B
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.
|
|
//
|
|
|
|
#include "AudioInput.h"
|
|
#if defined(__ANDROID__)
|
|
#include "../os/android/AudioInputAndroid.h"
|
|
#elif defined(__APPLE__)
|
|
#include <TargetConditionals.h>
|
|
#if TARGET_OS_IPHONE
|
|
#include "../os/darwin/AudioInputAudioUnit.h"
|
|
#else
|
|
#include "../os/darwin/AudioInputAudioUnitOSX.h"
|
|
#endif
|
|
#else
|
|
#error "Unsupported operating system"
|
|
#endif
|
|
|
|
CAudioInput::CAudioInput(){
|
|
failed=false;
|
|
}
|
|
|
|
CAudioInput *CAudioInput::Create(){
|
|
#if defined(__ANDROID__)
|
|
return new CAudioInputAndroid();
|
|
#elif defined(__APPLE__)
|
|
return new CAudioInputAudioUnit();
|
|
#endif
|
|
}
|
|
|
|
|
|
CAudioInput::~CAudioInput(){
|
|
|
|
}
|
|
|
|
bool CAudioInput::IsInitialized(){
|
|
return !failed;
|
|
}
|