Sending audio to a bluetooth enabled speaker, IOS

﹥>﹥吖頭↗ 提交于 2019-12-07 20:48:30

问题


I want to add a function to my App, where the user can choose to play the audio on a bluetooth enabled speaker. I have a Parrot Easydrive in my car and this works for phonecalls and for example the Dictafoon App among others.

I understand that I should use the Core Audio framework. WHen a bluetooth device is connected it is said that it is easy to stream the audio to that connection. I am now looking for Core Audio sample code (or a book) where connecting and streaming to a bluetooth device with Core Audio is explained.

Can anyone shed a light on this? If there is another framework or sample code which I can use please mention it!

Many thanks in advance!


回答1:


You don't write any specific Core Audio code, it is the same process as is used to play audio via AirPlay.

Basically you put a MPVolumeView into your UI, and the underlying framework will redirect your audio output for you. Once you implement this you will be able to use Bluetooth and any AirPlay enabled device with your app.



来源:https://stackoverflow.com/questions/14082182/sending-audio-to-a-bluetooth-enabled-speaker-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!