[英]Is it possible to send/receive voice from PC to Android device over Bluetooth
I have a PC (where java program is running), Bluetooth dongle (which supports A2DP) and Android device (2.3.6, which also supports A2DP). 我有一台PC(正在运行Java程序),蓝牙加密狗(支持A2DP)和Android设备(2.3.6,它也支持A2DP)。
I want to: 我想要:
I found this question , where Dennis says that "Phones are typically only Source devices (Source of the stream that can stream to sink devices), Sinks are Headsets or Bluetooth speakers.". 我发现了这个问题 ,丹尼斯说:“电话通常只是信源设备(可以流向信宿设备的流的源),信宿是耳机或蓝牙扬声器。” So it seems it is possible to implement case 2?
因此,似乎有可能实现案例2? Or not?
或不? And what about case 1, is it impossible to implement?
那么,情况1不可能实现吗?
It is true that Android phone are uniquely A2DP
source devices. 的确,Android手机是唯一的
A2DP
源设备。
Sadly, your first case is impossible to realize if you decide to rely on the A2DP
profile for streaming audio, because Android does not implement the required callbacks supposed to be handling BlueZ's advertisings when a remote device wants to stream audio to your phone. 可悲的是,如果您决定依赖
A2DP
配置文件来传输音频,则第一种情况是不可能实现的,因为当远程设备要将音频流传输到您的手机时,Android并没有实现要求的回调,该回调应用于处理BlueZ的广告。
The second use case is possible , given that you have a bluetooth enabled PC and some awesome apps that will decode and route the sound from the Bluetooth stack to the speakers. 假设您有一台启用了蓝牙的PC和一些很棒的应用程序,它们将解码声音并将其从蓝牙堆栈传送到扬声器,则第二种用例是可能的。 I managed once to reproduce this use case using
PulseAudio
and pulseaudio-module-bluetooth
on Ubuntu 12.10
. 我曾经设法在
Ubuntu 12.10
上使用PulseAudio
和pulseaudio-module-bluetooth
重现此用例。
Here is a working example showing how to manage the routing of the sound once a connected BT device begins to stream. 这是一个工作示例,显示了已连接的BT设备开始流式传输后如何管理声音的路由。 Here is another one.
这是另一个。 They both take place on Linux and I never did this on Windows though.
它们都发生在Linux上,但是我从未在Windows上执行过。
For the sake of completeness, here is another SO answer written by me, giving details about how to implement A2DP
sink capabilities on Android. 为了完整起见, 这是我写的另一个SO答案,其中提供了有关如何在Android上实现
A2DP
器功能的详细信息。
EDIT : 编辑:
Nothing forbids you to implement your own protocol for audio streaming via Bluetooth on an Android device, this will work, but as it will not be a standard, it will never comply with the system built-in Bluetooth profiles (A2DP, HFP ...). 没有什么可以禁止您在Android设备上实现自己的协议以通过蓝牙进行音频流传输的,但是可以使用,但是由于它不是标准,因此它永远不会符合系统内置的蓝牙配置文件(A2DP,HFP ... )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.