mirror of
https://github.com/danog/libtgvoip.git
synced 2024-12-02 17:51:06 +01:00
32 lines
734 B
C++
32 lines
734 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 "../os/darwin/AudioInputAudioUnit.h"
|
||
|
#include "../os/darwin/AudioUnitIO.h"
|
||
|
#else
|
||
|
#error "Unsupported operating system"
|
||
|
#endif
|
||
|
|
||
|
CAudioInput *CAudioInput::Create(){
|
||
|
#if defined(__ANDROID__)
|
||
|
return new CAudioInputAndroid();
|
||
|
#elif defined(__APPLE__)
|
||
|
return new CAudioInputAudioUnit(CAudioUnitIO::Get());
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
|
||
|
CAudioInput::~CAudioInput(){
|
||
|
#if defined(__APPLE__)
|
||
|
CAudioUnitIO::Release();
|
||
|
#endif
|
||
|
}
|
||
|
|