Liblinphone
4.5.0
|
Object holding audio device information. More...
#include <audio_device.hh>
Public Types | |
enum | Capabilities { CapabilityRecord = 1<<0, Capabilities::CapabilityPlay = 1<<1, Capabilities::CapabilityAll = 3 } |
Capabilities enum represents whether a device can record audio, play audio or both More... | |
enum | Type { Unknown, Type::Microphone, Type::Earpiece, Type::Speaker, Type::Bluetooth, Type::BluetoothA2DP, Type::Telephony, Type::AuxLine, Type::GenericUsb, Type::Headset, Type::Headphones } |
Type enum represents the different types of an audio device. More... | |
Public Member Functions | |
AudioDevice (void *ptr, bool takeRef=true) | |
LINPHONECXX_PUBLIC _LinphoneAudioDevice * | cPtr () |
LINPHONECXX_PUBLIC Capabilities | getCapabilities () const |
Returns the capabilities of the device. More... | |
LINPHONECXX_PUBLIC std::string | getDeviceName () const |
Returns the name of the audio device. More... | |
LINPHONECXX_PUBLIC std::string | getDriverName () const |
Returns the driver name used by the device. More... | |
LINPHONECXX_PUBLIC std::string | getId () const |
Returns the id of the audio device. More... | |
LINPHONECXX_PUBLIC Type | getType () const |
Returns the type of the device. More... | |
LINPHONECXX_PUBLIC bool | hasCapability (Capabilities capability) const |
Returns whether or not the audio device has the given capability. More... | |
Object holding audio device information.
It contains the name of the device, it's type if available (Earpiece, Speaker, Bluetooth, etc..) and capabilities (input, output or both) the name of the driver that created it (filter in mediastreamer). You can use the AudioDevice objects to configure default input/output devices or do it dynamically during a call. To get the list of available devices, use Core::getAudioDevices(). This list will be limited to one device of each type. Use Core::getExtendedAudioDevices() for a complete list.
|
strong |
Capabilities enum represents whether a device can record audio, play audio or both
Enumerator | |
---|---|
CapabilityPlay | Can record audio. |
CapabilityAll | Can play audio. |
|
strong |
Type enum represents the different types of an audio device.
LINPHONECXX_PUBLIC Capabilities linphone::AudioDevice::getCapabilities | ( | ) | const |
Returns the capabilities of the device.
LINPHONECXX_PUBLIC std::string linphone::AudioDevice::getDeviceName | ( | ) | const |
Returns the name of the audio device.
LINPHONECXX_PUBLIC std::string linphone::AudioDevice::getDriverName | ( | ) | const |
Returns the driver name used by the device.
LINPHONECXX_PUBLIC std::string linphone::AudioDevice::getId | ( | ) | const |
Returns the id of the audio device.
LINPHONECXX_PUBLIC Type linphone::AudioDevice::getType | ( | ) | const |
Returns the type of the device.
LINPHONECXX_PUBLIC bool linphone::AudioDevice::hasCapability | ( | Capabilities | capability | ) | const |
Returns whether or not the audio device has the given capability.
capability | the Capabilities to check |