Package org.linphone.core
Interface AudioDevice
public interface AudioDevice
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
devices or do it dynamically during a call.
To get the list of available devices, use
list will be limited to one device of each type. Use
for a complete list.
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/outputdevices or do it dynamically during a call.
To get the list of available devices, use
Core.getAudioDevices()
. Thislist will be limited to one device of each type. Use
Core.getExtendedAudioDevices()
for a complete list.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptionReturns the capabilities of the device.Returns the name of the audio device.Returns the driver name used by the device.boolean
Returns whether the audio device automatically follows the system's audio
routing policy.getId()
Returns the id of the audio device.long
Gets the native pointer used by this class to make native method calls.getType()
Returns the type of the device.Gets the object stored in this object user's databoolean
hasCapability
(AudioDevice.Capabilities capability) Returns whether or not the audio device has the given capability.void
setUserData
(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getCapabilities
AudioDevice.Capabilities getCapabilities()Returns the capabilities of the device.
- Returns:
- the
AudioDevice.Capabilities
of the audio device (RECORD, PLAY or both) as
a bit mask
-
getDeviceName
Returns the name of the audio device.
- Returns:
- the name of the audio device.
-
getDriverName
Returns the driver name used by the device.
- Returns:
- the name of the driver used by this audio device.
-
getFollowsSystemRoutingPolicy
boolean getFollowsSystemRoutingPolicy()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 actualAudioDevice.Type
may be
unknown at some point, typically when no calls are running, otherwise it is
reflected to be the actual system's audio route.- Returns:
- true if the audio device automatically follows the system audio routing
policy.
-
getId
Returns the id of the audio device.
- Returns:
- the id of the audio device.
-
getType
AudioDevice.Type getType()Returns the type of the device.
- Returns:
- the
AudioDevice.Type
of the audio device (microphone, speaker, earpiece,
bluetooth, etc...)
-
hasCapability
Returns whether or not the audio device has the given capability.
- Parameters:
capability
- theAudioDevice.Capabilities
to check- Returns:
- true if the audio device has the capability, false otherwise
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-