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 enumstatic 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.booleanReturns whether the audio device automatically follows the system's audio
routing policy.getId()Returns the id of the audio device.longGets the native pointer used by this class to make native method calls.getType()Returns the type of the device.booleanReturns whether the audio device is used to play the ringtone or not.Gets the object stored in this object user's databooleanhasCapability(AudioDevice.Capabilities capability) Returns whether or not the audio device has the given capability.voidsetUseForRinging(boolean useForRinging) Tells the audio device to be used to play the ringtone or not.voidsetUserData(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.Capabilitiesof 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.Typemay 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.Typeof the audio device (microphone, speaker, earpiece,
bluetooth, etc...)
-
getUseForRinging
boolean getUseForRinging()Returns whether the audio device is used to play the ringtone or not.
- Returns:
- Whether the audio device is used to play the ringtone or not.
-
setUseForRinging
void setUseForRinging(boolean useForRinging) Tells the audio device to be used to play the ringtone or not.
- Parameters:
useForRinging- Whether the audio device must be used to play the ringtone
or not.
-
hasCapability
Returns whether or not the audio device has the given capability.
- Parameters:
capability- theAudioDevice.Capabilitiesto 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()
-