简体   繁体   English

蓝牙a2dp配置文件如何工作?

[英]How does the bluetooth a2dp profile work?

I want to create a bluetooth music player application which streams audio from one device to another. 我想创建一个蓝牙音乐播放器应用程序,将音频从一个设备传输到另一个设备。 I have read everything on the android developers page about bluetooth and I found that a profile called a2dp has been specifically created for audio streaming. 我已经阅读了关于蓝牙的Android开发者页面上的所有内容,我发现专门为音频流创建了一个名为a2dp的配置文件。 However not much has been provided on how to use it. 但是,如何使用它并没有提供太多。 I have also gone through the bluetooth chat example but i have been unable to figure out how to actually send audio and how to receive it. 我也经历了蓝牙聊天示例,但我一直无法弄清楚如何实际发送音频以及如何接收它。 I have also read that a2dp sink functionality has been added as of android 5.0. 我还读到了android 5.0中添加了a2dp接收器功能。 After spending hours on stackoverflow I see numerous questions asking the same thing but without any satisfactory answer. 在堆栈溢出上花了好几个小时后,我看到很多问题都在问同样的问题,但没有任何令人满意的答

My main questions are- 我的主要问题是 -

  1. How does the bluetooth a2dp profile work? 蓝牙a2dp配置文件如何工作?
  2. Are there better methods to implement audio streaming between android devices apart from a2dp? 除了a2dp之外,还有更好的方法在Android设备之间实现音频流吗?

Any help would be greatly appreciated. 任何帮助将不胜感激。

You can read the AVDTP core specification to know what happens during an a2dp connection. 您可以阅读AVDTP核心规范,以了解在a2dp连接期间发生的情况。 But if you want to know about the working of it in terms of coding, I suggest you go through this blog which I found useful. 但是如果你想知道它在编码方面的工作,我建议你浏览一下我认为有用的博客。

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

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