简体   繁体   English

无法使用Bluetooth LE设备录制音频

[英]Unable to Record Audio with Bluetooth LE device

I was tinkering around creating a Voice Recorder in android. 我正在修补在android中创建录音机的问题。 I was able to record audio and play it back. 我能够录制音频并进行播放。 I am even able to record audio when a standard bluetooth headset(Bluetooth 2.X) is connected. 连接标准的蓝牙耳机(Bluetooth 2.X)时,我什至可以录制音频。

However, when i connect a BLE headset(Bluetooth 4.X) to my phone i am not able to record any audio, and i am not able to figure out why? 但是,当我将BLE耳机(蓝牙4.X)连接到手机时,我无法录制任何音频,并且我也无法弄清楚为什么?

Any idea what am i missing? 知道我想念什么吗?

Here's my manifest file 这是我的清单文件

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

Bluetooth 4.X adds LE transport alongside "Classic" Bluetooth transport (called BR/EDR). 蓝牙4.X在“经典”蓝牙传输(称为BR / EDR)的基础上增加了 LE传输。 A headset is surely not LE-only, because today's audio profiles use BR/EDR as transport, so when it comes to a Bluetooth headset there is little difference between 2.1 and 4.X. 耳机肯定不是仅LE耳机,因为当今的音频配置文件使用BR / EDR作为传输,因此,对于蓝牙耳机,2.1和4.X之间几乎没有什么区别。

So if the app worked with a 2.1 headset, it should work with any headset. 因此,如果该应用程序可与2.1耳机配合使用,则应与任何耳机配合使用。 Your problem is somewhere else -- either the new 4.X headset is broken or is not properly configured. 您的问题出在其他地方-新的4.X耳机坏了或配置不正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM