是否可以从PC发送/接收语音到Android设备通过蓝牙 [英] Is it possible to send/receive voice from PC to Android device over Bluetooth

查看:326
本文介绍了是否可以从PC发送/接收语音到Android设备通过蓝牙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台PC(其中java程序运行),蓝牙适配器(支持A2DP)和Android设备(2.3.6,同时也支持A2DP)。

I have a PC (where java program is running), Bluetooth dongle (which supports A2DP) and Android device (2.3.6, which also supports A2DP).

我想:

  1. 通过蓝牙从PC的麦克风发送实时语音数据,Android设备
  2. 通过蓝牙发送来自Android设备的麦克风实时语音数据到电脑

我发现<一href="http://stackoverflow.com/questions/5623699/how-to-create-programmatically-an-a2dp-connection-or-how-can-i-emulate-an-androi/5625223#5625223">this问题,其中,丹尼斯说:手机通常只有源设备(可以传输到终端设备的数据流的来源),接收器是耳机或蓝牙音箱。因此,似乎有可能实现壳体2?或不?又是怎么回事1的情况下,是不可能实现?

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? Or not? And what about case 1, is it impossible to implement?

推荐答案

这是事实,Android手机是唯一 A2DP 来源的设备。

It is true that Android phone are uniquely A2DP source devices.

不幸的是,你的第一种情况是不可能的,如果你决定要依靠 A2DP 配置文件的音频流,由于Android没有实现应该被处理所需的回调来实现的BlueZ的 advertisings当远程设备需要传输音频到您的手机。

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.

第二个用例是的可能的,因为你有蓝牙功能的电脑和一些真棒应用程序,将取消code和声音从蓝牙堆栈到扬声器。我设法使用一次重现这个用例的PulseAudio 的PulseAudio模块,蓝牙的Ubuntu 12.10

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. I managed once to reproduce this use case using PulseAudio and pulseaudio-module-bluetooth on Ubuntu 12.10.

这里是一个工作示例展示了如何来管理声音的路由连接的BT一次设备开始流传输。 这里是另外一个。他们都发生在Linux上,我从来没有在Windows操作系统上,虽然。

Here is a working example showing how to manage the routing of the sound once a connected BT device begins to stream. Here is another one. They both take place on Linux and I never did this on Windows though.

有关为了完整性,<一href="http://stackoverflow.com/questions/15557933/receive-audio-via-bluetooth-in-android/15559902#15559902">here另一个是这样,请回答我写的,提供有关如何实施的细节 A2DP 的在Android上的能力。

For the sake of completeness, here is another SO answer written by me, giving details about how to implement A2DP sink capabilities on Android.

编辑:

没有禁止你实现在Android设备上自己的协议通过蓝牙音频流,这将工作,但它不会是一个标准,它永远不会符合内置蓝牙配置文件(A2DP,HFP系统...)。

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 ...).

这篇关于是否可以从PC发送/接收语音到Android设备通过蓝牙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆