音频流WiFi到WiFi-广播 [英] Audio Stream WiFi to WiFi - Broadcast

查看:221
本文介绍了音频流WiFi到WiFi-广播的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个IOS应用程序,用户将启动该应用程序,记录音频语音(通过设备麦克风),然后将其广播到同一网络上的其他用户,所有这些都必须通过无线连接进行( WIFI).

I have a requirement for an IOS app where a user will start the app, records an audio speech (via device microphone) which would be broadcast to other user on the same network, all this has to be live over wireless connection(WIFI).

我对可能的解决方案进行了一些研究,还尝试了通过HTTP URL进行音频流传输,但这是不可行的,并且还涉及互联网.

I did some research for possible solutions and also tried audio streaming via HTTP URL, but it was not feasible and also involves internet.

我正在寻找您的意见,如果可行,那么正确的方法是什么(我应该寻找哪些库和API)

I'm looking for your opinions and if it's doable then what is the right approach, (what libraries and API's should I look for)

我不是iOS开发的新手,如果您能详细解释,我将不胜感激.

I'm novice to iOS development, i would really appreciate if you could explain in detail.

谢谢.

推荐答案

是的,它是可行的.您将需要两个主要组件:用于发送/接收数据的网络API,以及音频捕获和回放API.

Yes, it is doable. You will need two major components: A network API to send/receive data , and audio capture and playback API.

对于网络库,您可以尝试 CocoaAsyncSocket .使用起来非常简单.

For network library, you can try CocoaAsyncSocket. It is quite simple to use.

您可以将UDP协议与多播地址一起使用.甚至以为您说过要广播,但最好还是使用多播(发送到一组设备).

You can use UDP protocol with multicast address. Even thought you said you wanted to broadcast, but you would be better off using multicast ( send to a group of devices).

有关如何捕获和播放音频的示例,请在

For Audio sample how to capture and playback, check out my answer on this .

这篇关于音频流WiFi到WiFi-广播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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