Liblinphone  5.4.0
Typedefs | Enumerations | Functions
Audio

Typedefs

typedef struct _LinphoneAudioDevice LinphoneAudioDevice
 Object holding audio device information. More...
 
typedef enum _LinphoneAudioDeviceType LinphoneAudioDeviceType
 LinphoneAudioDeviceType enum represents the different types of an audio device.
 
typedef enum _LinphoneAudioDeviceCapabilities LinphoneAudioDeviceCapabilities
 LinphoneAudioDeviceCapabilities enum represents whether a device can record audio, play audio or both
 

Enumerations

enum  _LinphoneAudioDeviceType {
  LinphoneAudioDeviceTypeUnknown = 0,
  LinphoneAudioDeviceTypeMicrophone = 1,
  LinphoneAudioDeviceTypeEarpiece = 2,
  LinphoneAudioDeviceTypeSpeaker = 3,
  LinphoneAudioDeviceTypeBluetooth = 4,
  LinphoneAudioDeviceTypeBluetoothA2DP = 5,
  LinphoneAudioDeviceTypeTelephony = 6,
  LinphoneAudioDeviceTypeAuxLine = 7,
  LinphoneAudioDeviceTypeGenericUsb = 8,
  LinphoneAudioDeviceTypeHeadset = 9,
  LinphoneAudioDeviceTypeHeadphones = 10,
  LinphoneAudioDeviceTypeHearingAid = 11
}
 LinphoneAudioDeviceType enum represents the different types of an audio device. More...
 
enum  _LinphoneAudioDeviceCapabilities {
  LinphoneAudioDeviceCapabilityRecord = 1 << 0,
  LinphoneAudioDeviceCapabilityPlay = 1 << 1,
  LinphoneAudioDeviceCapabilityAll = 3
}
 LinphoneAudioDeviceCapabilities enum represents whether a device can record audio, play audio or both More...
 

Functions

const char * linphone_audio_device_get_id (const LinphoneAudioDevice *audio_device)
 Returns the id of the audio device. More...
 
const char * linphone_audio_device_get_device_name (const LinphoneAudioDevice *audio_device)
 Returns the name of the audio device. More...
 
const char * linphone_audio_device_get_driver_name (const LinphoneAudioDevice *audio_device)
 Returns the driver name used by the device. More...
 
LinphoneAudioDeviceCapabilities linphone_audio_device_get_capabilities (const LinphoneAudioDevice *audio_device)
 Returns the capabilities of the device. More...
 
LinphoneAudioDeviceType linphone_audio_device_get_type (const LinphoneAudioDevice *audio_device)
 Returns the type of the device. More...
 
bool_t linphone_audio_device_has_capability (const LinphoneAudioDevice *audio_device, const LinphoneAudioDeviceCapabilities capability)
 Returns whether or not the audio device has the given capability. More...
 
bool_t linphone_audio_device_get_follows_system_routing_policy (const LinphoneAudioDevice *audio_device)
 Returns whether the audio device automatically follows the system's audio routing policy. More...
 
LinphoneAudioDevicelinphone_audio_device_ref (LinphoneAudioDevice *audio_device)
 Takes a reference on a LinphoneAudioDevice. More...
 
void linphone_audio_device_unref (LinphoneAudioDevice *audio_device)
 Releases a LinphoneAudioDevice. More...
 

Detailed Description

Typedef Documentation

◆ LinphoneAudioDevice

typedef struct _LinphoneAudioDevice LinphoneAudioDevice

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 LinphoneAudioDevice objects to configure default input/output devices or do it dynamically during a call.

To get the list of available devices, use linphone_core_get_audio_devices(). This list will be limited to one device of each type. Use linphone_core_get_extended_audio_devices() for a complete list.

Enumeration Type Documentation

◆ _LinphoneAudioDeviceCapabilities

LinphoneAudioDeviceCapabilities enum represents whether a device can record audio, play audio or both

Enumerator
LinphoneAudioDeviceCapabilityRecord 

Can record audio.

LinphoneAudioDeviceCapabilityPlay 

Can play audio.

LinphoneAudioDeviceCapabilityAll 

Can play and record audio.

◆ _LinphoneAudioDeviceType

LinphoneAudioDeviceType enum represents the different types of an audio device.

Enumerator
LinphoneAudioDeviceTypeUnknown 

Unknown.

LinphoneAudioDeviceTypeMicrophone 

Microphone.

LinphoneAudioDeviceTypeEarpiece 

Earpiece.

LinphoneAudioDeviceTypeSpeaker 

Speaker.

LinphoneAudioDeviceTypeBluetooth 

Bluetooth.

LinphoneAudioDeviceTypeBluetoothA2DP 

Bluetooth A2DP.

LinphoneAudioDeviceTypeTelephony 

Telephony.

LinphoneAudioDeviceTypeAuxLine 

AuxLine.

LinphoneAudioDeviceTypeGenericUsb 

GenericUsb.

LinphoneAudioDeviceTypeHeadset 

Headset.

LinphoneAudioDeviceTypeHeadphones 

Headphones.

LinphoneAudioDeviceTypeHearingAid 

Hearing Aid.

Function Documentation

◆ linphone_audio_device_get_capabilities()

LinphoneAudioDeviceCapabilities linphone_audio_device_get_capabilities ( const LinphoneAudioDevice audio_device)

Returns the capabilities of the device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the LinphoneAudioDeviceCapabilities of the audio device (RECORD, PLAY or both) as a bit mask

◆ linphone_audio_device_get_device_name()

const char* linphone_audio_device_get_device_name ( const LinphoneAudioDevice audio_device)

Returns the name of the audio device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the name of the audio device.

◆ linphone_audio_device_get_driver_name()

const char* linphone_audio_device_get_driver_name ( const LinphoneAudioDevice audio_device)

Returns the driver name used by the device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the name of the driver used by this audio device.

◆ linphone_audio_device_get_follows_system_routing_policy()

bool_t linphone_audio_device_get_follows_system_routing_policy ( const LinphoneAudioDevice audio_device)

Returns whether the audio device automatically follows the system's audio routing policy.

This capability is available on some system (typically iOS) and might be convenient to simply specify liblinphone to let the system decide about which audio route is being used to handle a call. The actual LinphoneAudioDeviceType may be unknown at some point, typically when no calls are running, otherwise it is reflected to be the actual system's audio route.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
TRUE if the audio device automatically follows the system audio routing policy.

◆ linphone_audio_device_get_id()

const char* linphone_audio_device_get_id ( const LinphoneAudioDevice audio_device)

Returns the id of the audio device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the id of the audio device.

◆ linphone_audio_device_get_type()

LinphoneAudioDeviceType linphone_audio_device_get_type ( const LinphoneAudioDevice audio_device)

Returns the type of the device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the LinphoneAudioDeviceType of the audio device (microphone, speaker, earpiece, bluetooth, etc...)

◆ linphone_audio_device_has_capability()

bool_t linphone_audio_device_has_capability ( const LinphoneAudioDevice audio_device,
const LinphoneAudioDeviceCapabilities  capability 
)

Returns whether or not the audio device has the given capability.

Parameters
audio_devicethe LinphoneAudioDevice.
capabilitythe LinphoneAudioDeviceCapabilities to check
Returns
TRUE if the audio device has the capability, FALSE otherwise

◆ linphone_audio_device_ref()

LinphoneAudioDevice* linphone_audio_device_ref ( LinphoneAudioDevice audio_device)

Takes a reference on a LinphoneAudioDevice.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the same LinphoneAudioDevice object

◆ linphone_audio_device_unref()

void linphone_audio_device_unref ( LinphoneAudioDevice audio_device)

Releases a LinphoneAudioDevice.

Parameters
audio_devicethe LinphoneAudioDevice.