mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Don't use connected bluetooth audio device (if any) for recording a voice message
This commit is contained in:
parent
ff98c15840
commit
e8c67fdd6f
1 changed files with 2 additions and 6 deletions
|
|
@ -213,7 +213,6 @@ class AudioUtils {
|
|||
// In case no headset/hearing aid/bluetooth is connected, use microphone sound card
|
||||
// If none are available, default one will be used
|
||||
var headsetCard: AudioDevice? = null
|
||||
var bluetoothCard: AudioDevice? = null
|
||||
var microphoneCard: AudioDevice? = null
|
||||
for (device in coreContext.core.audioDevices) {
|
||||
if (device.hasCapability(AudioDevice.Capabilities.CapabilityRecord)) {
|
||||
|
|
@ -221,9 +220,6 @@ class AudioUtils {
|
|||
AudioDevice.Type.Headphones, AudioDevice.Type.Headset -> {
|
||||
headsetCard = device
|
||||
}
|
||||
AudioDevice.Type.Bluetooth, AudioDevice.Type.HearingAid -> {
|
||||
bluetoothCard = device
|
||||
}
|
||||
AudioDevice.Type.Microphone -> {
|
||||
microphoneCard = device
|
||||
}
|
||||
|
|
@ -232,9 +228,9 @@ class AudioUtils {
|
|||
}
|
||||
}
|
||||
Log.i(
|
||||
"$TAG Found headset/headphones sound card [$headsetCard], bluetooth/hearingAid sound card [$bluetoothCard] and microphone card [$microphoneCard]"
|
||||
"$TAG Found headset/headphones sound card [$headsetCard] and microphone card [$microphoneCard]"
|
||||
)
|
||||
return headsetCard ?: bluetoothCard ?: microphoneCard
|
||||
return headsetCard ?: microphoneCard
|
||||
}
|
||||
|
||||
@AnyThread
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue