mirror of
https://github.com/danog/libtgvoip.git
synced 2024-11-27 04:34:42 +01:00
697e250727
Replaced condition variables with semaphores Audio device enumeration & selection on OS X and Windows
41 lines
988 B
C++
41 lines
988 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.
|
|
//
|
|
|
|
#ifndef LIBTGVOIP_AUDIOINPUT_H
|
|
#define LIBTGVOIP_AUDIOINPUT_H
|
|
|
|
#include <stdint.h>
|
|
#include <vector>
|
|
#include <string>
|
|
#include "../MediaStreamItf.h"
|
|
|
|
namespace tgvoip{
|
|
|
|
class AudioInputDevice;
|
|
class AudioOutputDevice;
|
|
|
|
namespace audio{
|
|
class AudioInput : public MediaStreamItf{
|
|
public:
|
|
AudioInput();
|
|
AudioInput(std::string deviceID);
|
|
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);
|
|
static void EnumerateDevices(std::vector<AudioInputDevice>& devs);
|
|
|
|
protected:
|
|
std::string currentDevice;
|
|
bool failed;
|
|
};
|
|
}}
|
|
|
|
#endif //LIBTGVOIP_AUDIOINPUT_H
|